diff --git a/packages/create-emotion-styled/types/index.d.ts b/packages/create-emotion-styled/types/index.d.ts index 8673bc570..57532df68 100644 --- a/packages/create-emotion-styled/types/index.d.ts +++ b/packages/create-emotion-styled/types/index.d.ts @@ -2,7 +2,7 @@ // TypeScript Version: 2.3 import { Emotion, Interpolation as BaseInterpolation } from 'create-emotion'; -import React, { ComponentClass, ReactHTML, ReactSVG, Ref, SFC } from 'react'; +import * as React from 'react'; import { CreateStyled, diff --git a/packages/create-emotion-styled/types/react.d.ts b/packages/create-emotion-styled/types/react.d.ts index 3327e965c..066283e43 100644 --- a/packages/create-emotion-styled/types/react.d.ts +++ b/packages/create-emotion-styled/types/react.d.ts @@ -1,7 +1,7 @@ // Definitions by: Junyoung Clare Jang // TypeScript Version: 2.3 -import React, { ComponentClass, Ref, SFC } from 'react'; +import { ComponentClass, Ref, SFC } from 'react'; import { ClassInterpolation } from 'create-emotion'; import { diff --git a/packages/create-emotion-styled/types/test.tsx b/packages/create-emotion-styled/types/test.tsx index 818a53e3b..dfd29f3b6 100644 --- a/packages/create-emotion-styled/types/test.tsx +++ b/packages/create-emotion-styled/types/test.tsx @@ -1,5 +1,5 @@ import createEmotion from 'create-emotion'; -import React from 'react'; +import * as React from 'react'; import createEmotionStyled, { StyledComponent } from '../'; diff --git a/packages/create-emotion-styled/types/tsconfig.json b/packages/create-emotion-styled/types/tsconfig.json index 485b990d9..ea6734342 100644 --- a/packages/create-emotion-styled/types/tsconfig.json +++ b/packages/create-emotion-styled/types/tsconfig.json @@ -1,6 +1,5 @@ { "compilerOptions": { - "allowSyntheticDefaultImports": true, "baseUrl": "../", "forceConsistentCasingInFileNames": true, "jsx": "react", diff --git a/packages/emotion-server/types/tests.tsx b/packages/emotion-server/types/tests.tsx index 290345c64..d78aa8484 100644 --- a/packages/emotion-server/types/tests.tsx +++ b/packages/emotion-server/types/tests.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import { renderToNodeStream, renderToString } from 'react-dom/server'; import { extractCritical, renderStylesToNodeStream, renderStylesToString } from '../'; diff --git a/packages/emotion-server/types/tsconfig.json b/packages/emotion-server/types/tsconfig.json index e5314a3a6..838017f13 100644 --- a/packages/emotion-server/types/tsconfig.json +++ b/packages/emotion-server/types/tsconfig.json @@ -1,6 +1,5 @@ { "compilerOptions": { - "allowSyntheticDefaultImports": true, "baseUrl": "../", "forceConsistentCasingInFileNames": true, "jsx": "react", diff --git a/packages/emotion-theming/types/tests.tsx b/packages/emotion-theming/types/tests.tsx index 0b4192ce9..a2f3eccae 100644 --- a/packages/emotion-theming/types/tests.tsx +++ b/packages/emotion-theming/types/tests.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import * as React from 'react'; import * as emotionTheming from '../'; // tslint:disable-next-line:no-duplicate-imports import { ThemeProvider, withTheme, EmotionThemingModule } from '../'; diff --git a/packages/emotion-theming/types/tsconfig.json b/packages/emotion-theming/types/tsconfig.json index e4762fac1..5914b3490 100644 --- a/packages/emotion-theming/types/tsconfig.json +++ b/packages/emotion-theming/types/tsconfig.json @@ -4,7 +4,6 @@ "module": "es2015", "declaration": true, "strict": true, - "allowSyntheticDefaultImports": true, "moduleResolution": "node", "jsx": "react", "lib": ["es6"], diff --git a/packages/emotion/types/tests.tsx b/packages/emotion/types/tests.tsx index 892f25ad2..57b3d73f6 100644 --- a/packages/emotion/types/tests.tsx +++ b/packages/emotion/types/tests.tsx @@ -11,7 +11,7 @@ import { caches, } from '../'; // tslint:disable-next-line:no-implicit-dependencies -import React from 'react'; +import * as React from 'react'; flush(); diff --git a/packages/emotion/types/tsconfig.json b/packages/emotion/types/tsconfig.json index 485b990d9..ea6734342 100644 --- a/packages/emotion/types/tsconfig.json +++ b/packages/emotion/types/tsconfig.json @@ -1,6 +1,5 @@ { "compilerOptions": { - "allowSyntheticDefaultImports": true, "baseUrl": "../", "forceConsistentCasingInFileNames": true, "jsx": "react", diff --git a/packages/preact-emotion/types/test.tsx b/packages/preact-emotion/types/test.tsx index 24e419427..d31a33654 100644 --- a/packages/preact-emotion/types/test.tsx +++ b/packages/preact-emotion/types/test.tsx @@ -1,7 +1,9 @@ // tslint:disable-next-line:no-implicit-dependencies -import Preact, { h } from 'preact'; +import * as Preact from 'preact'; import styled, { flush, CreateStyled } from '../'; +const h = Preact.h; + let Component; let mount; diff --git a/packages/preact-emotion/types/tsconfig.json b/packages/preact-emotion/types/tsconfig.json index 6b25cb058..2330f2c24 100644 --- a/packages/preact-emotion/types/tsconfig.json +++ b/packages/preact-emotion/types/tsconfig.json @@ -1,6 +1,5 @@ { "compilerOptions": { - "allowSyntheticDefaultImports": true, "baseUrl": "../", "forceConsistentCasingInFileNames": true, "jsx": "react", diff --git a/packages/react-emotion/types/tests.tsx b/packages/react-emotion/types/tests.tsx index 0a9128b30..82e68a4cd 100644 --- a/packages/react-emotion/types/tests.tsx +++ b/packages/react-emotion/types/tests.tsx @@ -1,5 +1,5 @@ // tslint:disable-next-line:no-implicit-dependencies -import React from 'react'; +import * as React from 'react'; import styled, { flush, CreateStyled } from '../'; let Component; diff --git a/packages/react-emotion/types/tsconfig.json b/packages/react-emotion/types/tsconfig.json index 485b990d9..ea6734342 100644 --- a/packages/react-emotion/types/tsconfig.json +++ b/packages/react-emotion/types/tsconfig.json @@ -1,6 +1,5 @@ { "compilerOptions": { - "allowSyntheticDefaultImports": true, "baseUrl": "../", "forceConsistentCasingInFileNames": true, "jsx": "react",