From 81d451ed9979fb0d845bec701b9bf4d30277f3d8 Mon Sep 17 00:00:00 2001 From: James Diefenderfer Date: Fri, 27 Mar 2020 09:46:07 -0700 Subject: [PATCH] fix type ellision --- .../jest-circus/src/legacy-code-todo-rewrite/jestAdapter.ts | 2 +- packages/jest-jasmine2/src/index.ts | 2 +- packages/jest-runtime/src/index.ts | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapter.ts b/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapter.ts index 34d214f38dbd..2a9561d3a8ad 100644 --- a/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapter.ts +++ b/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapter.ts @@ -9,7 +9,7 @@ import * as path from 'path'; import type {Config} from '@jest/types'; import type {JestEnvironment} from '@jest/environment'; import type {TestResult} from '@jest/test-result'; -import Runtime = require('jest-runtime'); +import type {RuntimeType as Runtime} from 'jest-runtime'; import type {SnapshotStateType} from 'jest-snapshot'; const FRAMEWORK_INITIALIZER = require.resolve('./jestAdapterInit'); diff --git a/packages/jest-jasmine2/src/index.ts b/packages/jest-jasmine2/src/index.ts index d87e3451feee..f8ab81713895 100644 --- a/packages/jest-jasmine2/src/index.ts +++ b/packages/jest-jasmine2/src/index.ts @@ -10,7 +10,7 @@ import type {Config, Global} from '@jest/types'; import type {AssertionResult, TestResult} from '@jest/test-result'; import type {JestEnvironment} from '@jest/environment'; import type {SnapshotStateType} from 'jest-snapshot'; -import Runtime = require('jest-runtime'); +import type {RuntimeType as Runtime} from 'jest-runtime'; import {getCallsite} from '@jest/source-map'; import installEach from './each'; diff --git a/packages/jest-runtime/src/index.ts b/packages/jest-runtime/src/index.ts index 11bb29aa2850..cfef2ebf1704 100644 --- a/packages/jest-runtime/src/index.ts +++ b/packages/jest-runtime/src/index.ts @@ -64,6 +64,8 @@ type CacheFS = {[path: string]: string}; namespace Runtime { export type Context = JestContext; + // ditch this export when moving to esm - for now we need it for to avoid faulty type elision + export type RuntimeType = Runtime; } const testTimeoutSymbol = Symbol.for('TEST_TIMEOUT_SYMBOL');