Skip to content

Commit 90f9a98

Browse files
committed
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.
1 parent 51eabfa commit 90f9a98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tsconfig.lint.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"extends": "./tsconfig.json",
33
// TODO: Fix type errors and uncomment all directories
44
"include": [
5+
"app/declarations.d.ts",
56
// "app/**/*",
67
"app/__mocks__/**/*",
78
"app/actions/**/*",
@@ -17,8 +18,7 @@
1718
"app/reducers/**/*",
1819
"app/selectors/**/*",
1920
"app/store/**/*",
20-
"app/styles/**/*",
21+
"app/styles/**/*"
2122
// "app/util/**/*",
22-
"app/declarations.d.ts"
2323
]
2424
}

0 commit comments

Comments
 (0)