我正在尝试升级我的项目,该项目使用RN 0.56+Typescript编译器,使用
react-native-typescript-transformer
既然最新版本的Babel支持Typescript,我已经删除了TS编译器,并尝试使用RN+Babel 7来编译我的代码。
不过,我得到了以下错误:
error: bundling failed: SyntaxError: /Users/alexis.mangin/Workspace/zeos-native/packages/zeos-native-libs/ui/src/views/StickyTabView.tsx: Unexpected token, expected ")" (12:38)
10 |
11 | export interface IStickyTabViewProps {
> 12 | renderTopNavigationBar: ({ opacity }: { opacity: Animated.AnimatedInterpolation }) => JSX.Element;
| ^
13 | renderHeader: () => JSX.Element;
14 | headerMinHeight: number;
15 | tabs: {
我在这里看到一些人也有同样的问题:
https://github.com/ds300/react-native-typescript-transformer/issues/77
尽管如此,即使删除了transformer的所有实例,我仍然无法运行代码。
有人知道我怎么解决这个问题吗?
注册护士:0.57.0
反应:16.5.0
打字脚本:3.0.3
谢谢