UNPKG

1.04 kBTypeScriptView Raw
1import type { ResolveOptions, Resolver } from 'enhanced-resolve';
2export declare const defaultConditionNames: string[];
3export declare const defaultExtensions: string[];
4export declare const defaultExtensionAlias: {
5 '.js': string[];
6 '.jsx': string[];
7 '.cjs': string[];
8 '.mjs': string[];
9};
10export declare const defaultMainFields: string[];
11export declare const interfaceVersion = 2;
12export interface TsResolverOptions extends Omit<ResolveOptions, 'fileSystem' | 'useSyncFileSystemCalls'> {
13 alwaysTryTypes?: boolean;
14 project?: string[] | string;
15 extensions?: string[];
16}
17export declare function resolve(source: string, file: string, options?: TsResolverOptions | null, resolver?: Resolver | null): {
18 found: boolean;
19 path?: string | null;
20};
21export declare function createTypeScriptImportResolver(options?: TsResolverOptions | null): {
22 interfaceVersion: number;
23 name: string;
24 resolve(source: string, file: string): {
25 found: boolean;
26 path?: string | null | undefined;
27 };
28};