From f7a8613ad5997dc9d0874d2936cc2a4a445633f6 Mon Sep 17 00:00:00 2001 From: Rogin Farrer Date: Tue, 19 Oct 2021 12:18:59 -0400 Subject: [PATCH] fix: types improperly compiled (#77) --- src/types.ts | 2 +- src/utils.ts | 2 +- tsconfig.json | 14 +++++--------- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/types.ts b/src/types.ts index 8e6b33e..3a2c97f 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,4 +1,4 @@ -import { +import type { ReactNode, CSSProperties, TransitionEvent, diff --git a/src/utils.ts b/src/utils.ts index e8378f2..e049888 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -7,7 +7,7 @@ import { useLayoutEffect, } from 'react' import warning from 'tiny-warning' -import { AssignableRef } from './types' +import type { AssignableRef } from './types' type AnyFunction = (...args: any[]) => unknown diff --git a/tsconfig.json b/tsconfig.json index 0f195ef..962973e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,10 +1,11 @@ { + "include": ["src"], + "exclude": ["src/__tests__/**/*", "src/stories/**/*"], "compilerOptions": { - "target": "es5", - "module": "esnext", - "lib": ["dom", "esnext"], + "target": "ESNext", + "module": "ESNext", + "lib": ["dom", "ESNext"], "importHelpers": true, - "declaration": true, "sourceMap": true, "strict": true, "noImplicitAny": true, @@ -18,11 +19,6 @@ "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "moduleResolution": "node", - "baseUrl": "./", - "paths": { - "@": ["./"], - "*": ["src/*", "node_modules/*"] - }, "jsx": "react", "esModuleInterop": true, "skipLibCheck": true