Skip to content

Commit

Permalink
Fix broken type definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
mattphillips committed Feb 11, 2019
1 parent adf3b94 commit 8a0dded
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/jest-haste-map/src/ModuleMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ import H from './constants';
const EMPTY_OBJ = {} as {[key: string]: any};
const EMPTY_MAP = new Map();

type ValueType<T> = T extends Map<T, infer V> ? V : T;
type ValueType<T> = T extends Map<string, infer V> ? V : T;

export type SerializableModuleMap = {
// There is no easier way to extract the type of the entries of a Map
duplicates: [string, ValueType<DuplicatesIndex>];
map: [string, ValueType<ModuleMapData>];
mocks: [string, ValueType<MockData>];
duplicates: ReadonlyArray<[string, ValueType<DuplicatesIndex>]>;
map: ReadonlyArray<[string, ValueType<ModuleMapData>]>;
mocks: ReadonlyArray<[string, ValueType<MockData>]>;
rootDir: Config.Path;
};

Expand Down

0 comments on commit 8a0dded

Please sign in to comment.