Skip to content

Commit 679d217

Browse files
committed
Fix TS error
Also added a type-checker precommit hook
1 parent d0e6586 commit 679d217

File tree

17 files changed

+21
-2
lines changed

17 files changed

+21
-2
lines changed

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
pnpm check:types
12
pnpm lint
23
pnpm test
34
pnpm unused

apps/react-lightning-example/src/shaders/MyCustomTexture.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ export class MyCustomTexture extends Texture {
5454
});
5555
}
5656

57+
override getTextureSource(): Promise<TextureData> {
58+
return this.getTextureData();
59+
}
60+
5761
static override makeCacheKey(_props: MyCustomTextureProps): string | false {
5862
// // Cache by props (only do this if could be helpful, otherwise leave it uncached)
5963
// const rprops = MyCustomTexture.resolveDefaults(props)

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"scripts": {
1616
"build": "turbo build",
1717
"build:types": "turbo build:types",
18+
"check:types": "turbo check:types",
1819
"clean": "turbo clean",
1920
"ci:publish": "pnpm run build && pnpm exec changeset publish",
2021
"ci:version": "pnpm exec changeset version && pnpm install --no-frozen-lockfile",

packages/plugin-css-transform/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"build:types": "tsc --outDir dist/lib --declarationDir dist/types --declaration true --emitDeclarationOnly true && pnpm run build:copy-dts",
3939
"build:copy-dts": "copyfiles -f src/types/jsx.d.ts dist/types/types",
4040
"clean": "del ./dist",
41+
"check:types": "tsc --noEmit",
4142
"test:unit": "vitest run --passWithNoTests"
4243
},
4344
"devDependencies": {

packages/plugin-flexbox-lite/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"build:types": "tsc --outDir dist/lib --declarationDir dist/types --declaration true --emitDeclarationOnly true && pnpm run build:copy-dts",
3939
"build:copy-dts": "copyfiles -f src/types/jsx.d.ts dist/types/types",
4040
"clean": "del ./dist",
41+
"check:types": "tsc --noEmit",
4142
"test:unit": "vitest run --passWithNoTests"
4243
},
4344
"devDependencies": {

packages/plugin-flexbox/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"build:types": "tsc --outDir dist/lib --declarationDir dist/types --declaration true --emitDeclarationOnly true && pnpm run build:copy-dts",
3939
"build:copy-dts": "copyfiles -f src/types/jsx.d.ts dist/types/types",
4040
"clean": "del ./dist",
41+
"check:types": "tsc --noEmit",
4142
"test:unit": "vitest run --passWithNoTests"
4243
},
4344
"dependencies": {

packages/plugin-reanimated/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"build:bundle": "rollup -c --failAfterWarnings",
3636
"build:types": "tsc --outDir dist/lib --declarationDir dist/types --declaration true --emitDeclarationOnly true",
3737
"clean": "del ./dist",
38+
"check:types": "tsc --noEmit",
3839
"test:unit": "vitest run --passWithNoTests"
3940
},
4041
"devDependencies": {

packages/react-lightning-components/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"build:bundle": "rollup -c --failAfterWarnings",
6464
"build:types": "tsc --outDir dist/lib --declarationDir dist/types --declaration true --emitDeclarationOnly true",
6565
"clean": "del ./dist",
66+
"check:types": "tsc --noEmit",
6667
"test:unit": "vitest run --passWithNoTests"
6768
},
6869
"devDependencies": {

packages/react-lightning/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"build:copy-dts": "copyfiles -f src/types/jsx.d.ts dist/types/types",
4040
"watch": "pnpm run build:types && rollup -c -w",
4141
"clean": "del ./dist",
42+
"check:types": "tsc --noEmit",
4243
"test:unit": "vitest run --passWithNoTests"
4344
},
4445
"dependencies": {

packages/react-lightning/src/element/LightningViewElement.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ export class LightningViewElement<
440440
animate = true,
441441
) {
442442
if (process.env.NODE_ENV !== 'production') {
443-
__checkProps(key);
443+
__checkProps([key]);
444444
}
445445

446446
if (this.node[key] === value) {

packages/react-native-lightning-components/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"build:bundle": "rollup -c --failAfterWarnings",
5050
"build:types": "tsc --outDir dist/lib --declarationDir dist/types --declaration true --emitDeclarationOnly true",
5151
"clean": "del ./dist",
52+
"check:types": "tsc --noEmit",
5253
"test:unit": "vitest run --passWithNoTests"
5354
},
5455
"devDependencies": {

packages/react-native-lightning/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"build:bundle": "rollup -c --failAfterWarnings",
3838
"build:types": "tsc --outDir dist/lib --declarationDir dist/types --declaration true --emitDeclarationOnly true",
3939
"clean": "del ./dist",
40+
"check:types": "tsc --noEmit",
4041
"test:unit": "vitest run --passWithNoTests"
4142
},
4243
"dependencies": {

packages/vite-plugin-msdf-fontgen/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"build:types": "tsc --outDir dist/lib --declarationDir dist/types --declaration true --emitDeclarationOnly true",
3636
"clean": "del ./dist",
3737
"prepare": "pnpm run build",
38+
"check:types": "tsc --noEmit",
3839
"test:unit": "vitest run --passWithNoTests"
3940
},
4041
"dependencies": {

packages/vite-plugin-react-native-lightning/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"scripts": {
3131
"build": "tsc",
3232
"prepare": "pnpm run build",
33+
"check:types": "tsc --noEmit",
3334
"test:unit": "vitest run --passWithNoTests"
3435
},
3536
"dependencies": {

packages/vite-plugin-react-reanimated-lightning/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"scripts": {
3232
"build": "tsc",
3333
"prepare": "pnpm run build",
34+
"check:types": "tsc --noEmit",
3435
"test:unit": "vitest run --passWithNoTests"
3536
},
3637
"devDependencies": {

templates/app-template/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"clean": "del ./dist",
2020
"dev": "vite --host",
2121
"preview": "vite preview --host",
22+
"check:types": "tsc --noEmit",
2223
"test:unit": "vitest run --passWithNoTests"
2324
},
2425
"dependencies": {

turbo.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"dev": {
1717
"cache": false,
1818
"persistent": true
19-
}
19+
},
20+
"check:types": {}
2021
},
2122
"globalEnv": ["BASE_URL", "NODE_ENV"]
2223
}

0 commit comments

Comments
 (0)