Skip to content

Commit

Permalink
fix: use import type syntax
Browse files Browse the repository at this point in the history
BREAKING CHANGE: do not emit type information
  • Loading branch information
SimenB committed May 23, 2020
1 parent f2e12da commit 8ff117c
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 20 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"license": "MIT",
"author": "Simen Bekkhus <sbekkhus91@gmail.com>",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"files": [
"lib/"
],
Expand Down
6 changes: 3 additions & 3 deletions src/PostMessage.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
12 changes: 8 additions & 4 deletions src/Reporter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/SnapshotStatus.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
4 changes: 2 additions & 2 deletions src/SnapshotSummary.tsx
Original file line number Diff line number Diff line change
@@ -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<{
Expand Down
4 changes: 2 additions & 2 deletions src/Summary.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
4 changes: 2 additions & 2 deletions src/VerboseTests.tsx
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
4 changes: 2 additions & 2 deletions src/shared.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down

0 comments on commit 8ff117c

Please sign in to comment.