jest-module-name-mapper
Version:
Synchronization tsconfig paths with Jest (module name mapper)
37 lines (31 loc) • 1.14 kB
TypeScript
declare module 'jest-module-name-mapper/base-url.factory' {
export const tsconfigRootPrefix = "./";
export const jestRootPrefix = "<rootDir>/";
export const baseUrlFactory: (baseUrl: string) => string;
}
declare module 'jest-module-name-mapper/models/tsconfig.model' {
export type TSConfigPaths = Record<string, string[]>;
export interface TSConfigCompilerOptions {
baseUrl: string;
outDir: string;
paths: TSConfigPaths;
}
export interface TSConfig {
compilerOptions: TSConfigCompilerOptions;
}
export type FreshPath = [string, string[]];
export type JestPath = Record<string, string>;
}
declare module 'jest-module-name-mapper/models/index' {
export * from 'jest-module-name-mapper/models/tsconfig.model';
}
declare module 'jest-module-name-mapper/path.factory' {
export const moduleNameMapper: (path?: string | undefined) => Record<string, string>;
}
declare module 'jest-module-name-mapper/index' {
const bootstrap: (path?: string | undefined) => Record<string, string>;
export default bootstrap;
}
declare module 'jest-module-name-mapper' {
export {default} from 'jest-module-name-mapper/index';
}