Skip to content

Commit 7ef447e

Browse files
sandersnmmazzarolo
authored andcommitted
fix: Improve compatibility of tsconfig.json (#371)
Turn off esModuleInterop, which not all consumers are guaranteed to have. This requires changing ```ts import React from 'react' ``` to ```ts import * as React from 'react' ```
1 parent 55e533e commit 7ef447e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/modal.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, {ReactNode} from 'react';
1+
import * as React from 'react';
2+
import {ReactNode} from 'react';
23
import {
34
Animated,
45
DeviceEventEmitter,

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"compilerOptions": {
1010
"lib": ["es5", "es6", "esnext.asynciterable"],
1111
"allowSyntheticDefaultImports": true,
12-
"esModuleInterop": true,
12+
"esModuleInterop": false,
1313
"jsx": "react",
1414
"moduleResolution": "node",
1515
"strict": true,

0 commit comments

Comments
 (0)