aboutsummaryrefslogtreecommitdiff
path: root/node_modules/resolve-dependencies/lib/file.d.ts
blob: 86db9a6ca668dc5549697d560f2b58167e496279 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
export declare function isScript(code: string): boolean;
export declare function hasModuleGlobs(file: Pick<File, 'package' | 'belongsTo'>): boolean;
export declare function extraGlobs(file: Pick<File, 'package' | 'belongsTo'>): string[];
export declare function nodeModuleGlobs(file: Pick<File, 'package' | 'belongsTo'>, useDefault?: boolean): string[];
export declare type JsLoaderOptions = {
    loadContent: boolean;
    isEntry: boolean;
    type: 'module' | 'commonjs';
    context?: {
        moduleRoot: string;
        package: any;
        expanded?: boolean;
        globs?: string[];
    };
    expand: 'all' | 'variable' | 'none';
};
export declare type FileMap = {
    [key: string]: File | null;
};
export declare type Files = {
    [key: string]: File;
};
export interface File {
    deps: FileMap;
    belongsTo?: File;
    realSize?: number;
    realPath?: string;
    size: number;
    absPath: string;
    moduleType: 'module' | 'commonjs';
    contents: string | null;
    contextExpanded?: boolean;
    variableImports?: boolean;
    moduleRoot?: string;
    package?: any;
}
export declare function isNodeModule(request: string): boolean;
export declare function ensureDottedRelative(from: string, to: string): string;
export declare function createFile(absPath: string): File;