diff --git a/package.json b/package.json index a1795fb..d086917 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,6 @@ "license": "MIT", "author": "Simen Bekkhus ", "main": "lib/index.js", - "types": "lib/index.d.ts", "files": [ "lib/" ], diff --git a/src/PostMessage.tsx b/src/PostMessage.tsx index f899fdd..c313652 100644 --- a/src/PostMessage.tsx +++ b/src/PostMessage.tsx @@ -1,6 +1,6 @@ -import { AggregatedResult } from '@jest/test-result'; -import { Config } from '@jest/types'; -import { Context } from '@jest/reporters/build/types'; +import type { AggregatedResult } from '@jest/test-result'; +import type { Config } from '@jest/types'; +import type { Context } from '@jest/reporters'; import { testPathPatternToRegExp } from 'jest-util'; import * as React from 'react'; import { Box, Color, Text } from 'ink'; diff --git a/src/Reporter.tsx b/src/Reporter.tsx index 04ecb20..169c766 100644 --- a/src/Reporter.tsx +++ b/src/Reporter.tsx @@ -2,10 +2,14 @@ import * as path from 'path'; import * as React from 'react'; import { Box, Color, ColorProps, Static, render, useApp, useStdout } from 'ink'; import slash from 'slash'; -import { Config } from '@jest/types'; -import { AggregatedResult, TestResult } from '@jest/test-result'; -import { BaseReporter, ReporterOnStartOptions } from '@jest/reporters'; -import { Context, Test } from '@jest/reporters/build/types'; +import type { Config } from '@jest/types'; +import type { AggregatedResult, TestResult } from '@jest/test-result'; +import { + BaseReporter, + Context, + ReporterOnStartOptions, + Test, +} from '@jest/reporters'; import { SnapshotStatus } from './SnapshotStatus'; import { Summary } from './Summary'; import { DisplayName, FormattedPath, ResultHeader, Runs } from './shared'; diff --git a/src/SnapshotStatus.tsx b/src/SnapshotStatus.tsx index 13cdca7..0ad5e37 100644 --- a/src/SnapshotStatus.tsx +++ b/src/SnapshotStatus.tsx @@ -1,4 +1,4 @@ -import { TestResult } from '@jest/test-result'; +import type { TestResult } from '@jest/test-result'; import * as React from 'react'; import { Box, Color } from 'ink'; diff --git a/src/SnapshotSummary.tsx b/src/SnapshotSummary.tsx index 90cf715..ffbb78e 100644 --- a/src/SnapshotSummary.tsx +++ b/src/SnapshotSummary.tsx @@ -1,8 +1,8 @@ import * as React from 'react'; import { Box, Color, Text } from 'ink'; -import { Config } from '@jest/types'; +import type { Config } from '@jest/types'; import { pluralize } from 'jest-util'; -import { SnapshotSummary as SnapshotSummaryType } from '@jest/test-result'; +import type { SnapshotSummary as SnapshotSummaryType } from '@jest/test-result'; import { Arrow, Dot, DownArrow, FormatFullTestPath } from './shared'; const SnapshotSummary: React.FC<{ diff --git a/src/Summary.tsx b/src/Summary.tsx index c73c178..eadee09 100644 --- a/src/Summary.tsx +++ b/src/Summary.tsx @@ -1,5 +1,5 @@ -import { SummaryOptions } from '@jest/reporters/build/types'; -import { AggregatedResult } from '@jest/test-result'; +import type { SummaryOptions } from '@jest/reporters'; +import type { AggregatedResult } from '@jest/test-result'; import { pluralize } from 'jest-util'; import * as React from 'react'; import { Box, Color, Text } from 'ink'; diff --git a/src/VerboseTests.tsx b/src/VerboseTests.tsx index 194a872..da8a11b 100644 --- a/src/VerboseTests.tsx +++ b/src/VerboseTests.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { Box, Color, Text } from 'ink'; -import { Config } from '@jest/types'; -import { AssertionResult, Suite, TestResult } from '@jest/test-result'; +import type { Config } from '@jest/types'; +import type { AssertionResult, Suite, TestResult } from '@jest/test-result'; import { VerboseReporter } from '@jest/reporters'; import { specialChars } from 'jest-util'; diff --git a/src/shared.tsx b/src/shared.tsx index 027be53..4d60936 100644 --- a/src/shared.tsx +++ b/src/shared.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { Box, Color, ColorProps } from 'ink'; -import { TestResult } from '@jest/test-result'; -import { Config } from '@jest/types'; +import type { TestResult } from '@jest/test-result'; +import type { Config } from '@jest/types'; import chalk from 'chalk'; import slash from 'slash'; import { relativePath } from './utils'; diff --git a/src/utils.ts b/src/utils.ts index 146761b..9bef6d4 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,5 +1,5 @@ import * as path from 'path'; -import { Config } from '@jest/types'; +import type { Config } from '@jest/types'; export const relativePath = ( config: Config.GlobalConfig | Config.ProjectConfig, diff --git a/tsconfig.json b/tsconfig.json index eabe608..18409cf 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,11 +1,12 @@ { "compilerOptions": { + "lib": ["es2016", "dom"], "module": "commonjs", "moduleResolution": "node", "jsx": "react", - "declaration": true, - "emitDeclarationOnly": true, + "declaration": false, "isolatedModules": true, + "importsNotUsedAsValues": "error", "noImplicitReturns": true, "strict": true, "esModuleInterop": true,