Open mohitmehta1996 opened 4 years ago
This should work:
$ tsc --outDir js -p ./ --noEmit false --target esnext
i get this after running that command:
⟩ tsc --outDir js -p ./ --noEmit false --target esnext
src/bottomTabs.tsx:21:33 - error TS2339: Property 'state' does not exist on type 'RouteProp<StackNavigatorParamlist, "FeedList">'.
21 const routeName = props.route.state
~~~~~
src/bottomTabs.tsx:22:19 - error TS2339: Property 'state' does not exist on type 'RouteProp<StackNavigatorParamlist, "FeedList">'.
22 ? props.route.state.routes[props.route.state.index].name
~~~~~
src/bottomTabs.tsx:22:44 - error TS2339: Property 'state' does not exist on type 'RouteProp<StackNavigatorParamlist, "FeedList">'.
22 ? props.route.state.routes[props.route.state.index].name
~~~~~
src/drawerContent.tsx:25:42 - error TS2304: Cannot find name 'DrawerNavigationProp'.
25 type Props = DrawerContentComponentProps<DrawerNavigationProp>;
~~~~~~~~~~~~~~~~~~~~
src/drawerContent.tsx:44:11 - error TS2769: No overload matches this call.
Overload 1 of 2, '(props: Readonly<AnimateProps<ViewStyle, ViewProps>>): View', gave the following error.
Type '{ backgroundColor: string; transform: { translateX: Animated.Node<number>; }[]; }' is not assignable to type 'false | AnimateStyle<ViewStyle> | RegisteredStyle<AnimateStyle<ViewStyle>> | RecursiveArray<false | AnimateStyle<ViewStyle> | RegisteredStyle<...>> | readonly (false | ... 1 more ... | RegisteredStyle<...>)[]'.
The types returned by 'transform.pop()' are incompatible between these types.
Type '{ translateX: Animated.Node<number>; }' is not assignable to type 'PerpectiveTransform | RotateTransform | RotateXTransform | RotateYTransform | RotateZTransform | ... 6 more ... | SkewYTransform'.
Types of property 'translateX' are incompatible.
Type 'AnimatedNode<number>' is not assignable to type 'number'.
Overload 2 of 2, '(props: AnimateProps<ViewStyle, ViewProps>, context?: any): View', gave the following error.
Type '{ backgroundColor: string; transform: { translateX: Animated.Node<number>; }[]; }' is not assignable to type 'false | AnimateStyle<ViewStyle> | RegisteredStyle<AnimateStyle<ViewStyle>> | RecursiveArray<false | AnimateStyle<ViewStyle> | RegisteredStyle<...>> | readonly (false | ... 1 more ... | RegisteredStyle<...>)[]'.
The types returned by 'transform.pop()' are incompatible between these types.
Type '{ translateX: Animated.Node<number>; }' is not assignable to type 'PerpectiveTransform | RotateTransform | RotateXTransform | RotateYTransform | RotateZTransform | ... 6 more ... | SkewYTransform'.
Types of property 'translateX' are incompatible.
Type 'AnimatedNode<number>' is not assignable to type 'number'.
44 {
~
45 backgroundColor: paperTheme.colors.surface,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46 transform: [{ translateX }],
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
47 },
~~~~~~~~~~~
src/stack.tsx:85:35 - error TS2339: Property 'state' does not exist on type 'RouteProp<StackNavigatorParamlist, "FeedList">'.
85 const routeName = route.state
~~~~~
src/stack.tsx:86:21 - error TS2339: Property 'state' does not exist on type 'RouteProp<StackNavigatorParamlist, "FeedList">'.
86 ? route.state.routes[route.state.index].name
~~~~~
src/stack.tsx:86:40 - error TS2339: Property 'state' does not exist on type 'RouteProp<StackNavigatorParamlist, "FeedList">'.
86 ? route.state.routes[route.state.index].name
~~~~~
Found 8 errors.
how can I convert this repo to javascript ?