Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix image import related type errors #9214

Merged
merged 1 commit into from
Apr 12, 2024

Commits on Apr 12, 2024

  1. fix: Fix image import related type errors

    There have been type errors showing up on some PRs relating to image
    imports; TypeScript interprets them as strings, but we have them typed
    as `ImageSourcePropType`. The mismatch is there because these image
    imports are modified later in the build system.
    
    Normally this is handled by our type declarations, which declare
    upfront which types these imports should have. But on some PRs, it
    seems that TypeScript will evaluate these declarations too late, after
    files including image imports.
    
    I had trouble reproducing this problem on `main`, but it can be seen
    in the PR #8828 (commit b027cfa). If
    you include this change on that branch, it resolves the problem.
    Gudahtt committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    90f9a98 View commit details
    Browse the repository at this point in the history