Skip to content

Commit

Permalink
Fix typecheck issues
Browse files Browse the repository at this point in the history
  • Loading branch information
MatiPl01 committed Jan 21, 2025
1 parent c72bb12 commit 4ce44be
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 15 deletions.
1 change: 0 additions & 1 deletion apps/common-app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"plugins": [{ "name": "./resolver.js" }],
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
Expand Down
13 changes: 13 additions & 0 deletions apps/fabric-example/images.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
declare module '*.jpg' {
import type { ImageSourcePropType } from 'react-native';

const value: ImageSourcePropType;
export default value;
}

declare module '*.png' {
import type { ImageSourcePropType } from 'react-native';

const value: ImageSourcePropType;
export default value;
}
6 changes: 6 additions & 0 deletions apps/fabric-example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["../common-app/src/*"]
}
},
"exclude": ["node_modules", "metro.config.js"]
}
13 changes: 13 additions & 0 deletions apps/macos-example/images.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
declare module '*.jpg' {
import type { ImageSourcePropType } from 'react-native';

const value: ImageSourcePropType;
export default value;
}

declare module '*.png' {
import type { ImageSourcePropType } from 'react-native';

const value: ImageSourcePropType;
export default value;
}
17 changes: 8 additions & 9 deletions apps/macos-example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"extends": "../../tsconfig.json"
// "compilerOptions": {
// "baseUrl": ".",
// "paths": {
// "react-native-reanimated": ["../"],
// "react": ["./node_modules/@types/react"]
// }
// },
// "exclude": []
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["../common-app/src/*"]
// "react": ["./node_modules/@types/react"]
}
}
}
13 changes: 13 additions & 0 deletions apps/paper-example/images.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
declare module '*.jpg' {
import type { ImageSourcePropType } from 'react-native';

const value: ImageSourcePropType;
export default value;
}

declare module '*.png' {
import type { ImageSourcePropType } from 'react-native';

const value: ImageSourcePropType;
export default value;
}
8 changes: 7 additions & 1 deletion apps/paper-example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{
"extends": "../../tsconfig.json"
"extends": "../../tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["../common-app/src/*"]
}
}
}
13 changes: 13 additions & 0 deletions apps/web-example/images.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
declare module '*.jpg' {
import type { ImageSourcePropType } from 'react-native';

const value: ImageSourcePropType;
export default value;
}

declare module '*.png' {
import type { ImageSourcePropType } from 'react-native';

const value: ImageSourcePropType;
export default value;
}
5 changes: 3 additions & 2 deletions apps/web-example/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"extends": "expo/tsconfig.base",
"compilerOptions": {
"strict": true,
"baseUrl": "../..",
"paths": {
"@/*": ["./*"],
"react-native-reanimated": ["../../packages/react-native-reanimated/src"]
"@/*": ["./apps/common-app/src/*"]
// "react-native-reanimated": ["./packages/react-native-reanimated/src"]
}
},
"include": ["**/*.ts", "**/*.tsx"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
import { forwardRef } from 'react';
import React from 'react';
import type {
FunctionComponent,
ComponentClass,
Expand Down Expand Up @@ -56,7 +56,7 @@ export default function createAnimatedComponent<P extends object>(
}
}

return forwardRef<Component>((props, ref) => {
return React.forwardRef<Component>((props, ref) => {
return (
<AnimatedComponent
{...props}
Expand Down

0 comments on commit 4ce44be

Please sign in to comment.