React-native-screens: [TypeScript] Minor issue: cannot re-export type.

Created on 24 Apr 2020  路  2Comments  路  Source: software-mansion/react-native-screens

ERROR in node_modules/react-native-screens/native-stack/index.tsx(17,3):
Re-exporting a type when the '--isolatedModules' flag is provided requires using 'export type'.
    15 |  */
    16 | export {
  > 17 |   NativeStackNavigationOptions,
       |   ^
    18 |   NativeStackNavigationProp,
    19 | } from './types';
    20 | 

It seems like, if the isolatedModules flag is set to true in tsconfig.json, then this line needs to be changed to:

export type {
  NativeStackNavigationOptions,
  NativeStackNavigationProp,
} from './types';

I tried setting isolatedModules to false, but Next.js requires it to be true to build.

Could I submit a PR to change this line?

https://github.com/software-mansion/react-native-screens/blob/dd115b8be0b4ce99be15c0d6f352283f4959c872/native-stack/index.tsx#L16

Most helpful comment

Thank you!

All 2 comments

It should be resolved now so I am closing it. Feel free to comment if I am wrong.

Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dotconnor picture dotconnor  路  5Comments

ukasiu picture ukasiu  路  4Comments

harrisrobin picture harrisrobin  路  3Comments

chai86 picture chai86  路  3Comments

OmarBasem picture OmarBasem  路  4Comments