| | |
| | | /** |
| | | * content |
| | | */ |
| | | context?: object; |
| | | context?: Context; |
| | | |
| | | /** |
| | | * description file path |
| | |
| | | * description file data |
| | | */ |
| | | descriptionFileData?: JsonObject; |
| | | |
| | | /** |
| | | * tsconfig paths map |
| | | */ |
| | | tsconfigPathsMap?: null | TsconfigPathsMap; |
| | | |
| | | /** |
| | | * relative path |
| | |
| | | >; |
| | | apply(resolver: Resolver): void; |
| | | } |
| | | type Context = KnownContext & Record<any, any>; |
| | | declare interface Dirent<T extends string | Buffer = string> { |
| | | /** |
| | | * true when is file, otherwise false |
| | |
| | | | JsonValue[]; |
| | | } |
| | | type JsonValue = null | string | number | boolean | JsonObject | JsonValue[]; |
| | | declare interface KnownContext { |
| | | /** |
| | | * environments |
| | | */ |
| | | environments?: string[]; |
| | | } |
| | | declare interface KnownHooks { |
| | | /** |
| | | * resolve step hook |
| | |
| | | yield?: (request: ResolveRequest) => void; |
| | | } |
| | | declare interface ResolveFunction { |
| | | (context: object, path: string, request: string): string | false; |
| | | (context: Context, path: string, request: string): string | false; |
| | | (path: string, request: string): string | false; |
| | | } |
| | | declare interface ResolveFunctionAsync { |
| | | ( |
| | | context: object, |
| | | context: Context, |
| | | path: string, |
| | | request: string, |
| | | resolveContext: ResolveContext, |
| | |
| | | ) => void, |
| | | ): void; |
| | | ( |
| | | context: object, |
| | | context: Context, |
| | | path: string, |
| | | request: string, |
| | | callback: ( |
| | |
| | | * prefer absolute |
| | | */ |
| | | preferAbsolute: boolean; |
| | | |
| | | /** |
| | | * tsconfig file path or config object |
| | | */ |
| | | tsconfig: string | boolean | TsconfigOptions; |
| | | } |
| | | declare interface ResolveOptionsResolverFactoryObject_2 { |
| | | /** |
| | |
| | | * Prefer to resolve server-relative urls as absolute paths before falling back to resolve in roots |
| | | */ |
| | | preferAbsolute?: boolean; |
| | | |
| | | /** |
| | | * TypeScript config file path or config object with configFile and references |
| | | */ |
| | | tsconfig?: string | boolean | TsconfigOptions; |
| | | } |
| | | type ResolveRequest = BaseResolveRequest & Partial<ParsedIdentifier>; |
| | | declare abstract class Resolver { |
| | |
| | | [ResolveRequest, ResolveContext], |
| | | null | ResolveRequest |
| | | >; |
| | | resolveSync(context: object, path: string, request: string): string | false; |
| | | resolveSync(context: Context, path: string, request: string): string | false; |
| | | resolve( |
| | | context: object, |
| | | context: Context, |
| | | path: string, |
| | | request: string, |
| | | resolveContext: ResolveContext, |
| | |
| | | */ |
| | | realpathSync?: RealPathSync; |
| | | } |
| | | declare interface TsconfigOptions { |
| | | /** |
| | | * A relative path to the tsconfig file based on cwd, or an absolute path of tsconfig file |
| | | */ |
| | | configFile?: string; |
| | | |
| | | /** |
| | | * References to other tsconfig files. 'auto' inherits from TypeScript config, or an array of relative/absolute paths |
| | | */ |
| | | references?: string[] | "auto"; |
| | | |
| | | /** |
| | | * Override baseUrl from tsconfig.json. If provided, this value will be used instead of the baseUrl in the tsconfig file |
| | | */ |
| | | baseUrl?: string; |
| | | } |
| | | declare interface TsconfigPathsData { |
| | | /** |
| | | * tsconfig file data |
| | | */ |
| | | alias: AliasOption[]; |
| | | |
| | | /** |
| | | * tsconfig file data |
| | | */ |
| | | modules: string[]; |
| | | } |
| | | declare interface TsconfigPathsMap { |
| | | /** |
| | | * main tsconfig paths data |
| | | */ |
| | | main: TsconfigPathsData; |
| | | |
| | | /** |
| | | * main tsconfig base URL (absolute path) |
| | | */ |
| | | mainContext: string; |
| | | |
| | | /** |
| | | * referenced tsconfig paths data mapped by baseUrl |
| | | */ |
| | | refs: { [index: string]: TsconfigPathsData }; |
| | | |
| | | /** |
| | | * all contexts (main + refs) for quick lookup |
| | | */ |
| | | allContexts: { [index: string]: TsconfigPathsData }; |
| | | |
| | | /** |
| | | * file dependencies |
| | | */ |
| | | fileDependencies: Set<string>; |
| | | } |
| | | declare class TsconfigPathsPlugin { |
| | | constructor(configFileOrOptions: string | true | TsconfigOptions); |
| | | configFile: string; |
| | | references: "auto" | TsconfigReference[]; |
| | | baseUrl?: string; |
| | | apply(resolver: Resolver): void; |
| | | } |
| | | declare interface TsconfigReference { |
| | | /** |
| | | * Path to the referenced project |
| | | */ |
| | | path: string; |
| | | } |
| | | declare interface URL_url extends URL_Import {} |
| | | declare interface WriteOnlySet<T> { |
| | | add: (item: T) => void; |
| | | } |
| | | declare function exports( |
| | | context: object, |
| | | context: Context, |
| | | path: string, |
| | | request: string, |
| | | resolveContext: ResolveContext, |
| | |
| | | ) => void, |
| | | ): void; |
| | | declare function exports( |
| | | context: object, |
| | | context: Context, |
| | | path: string, |
| | | request: string, |
| | | callback: ( |
| | |
| | | CachedInputFileSystem, |
| | | CloneBasenamePlugin, |
| | | LogInfoPlugin, |
| | | TsconfigPathsPlugin, |
| | | ResolveOptionsOptionalFS, |
| | | BaseFileSystem, |
| | | PnpApi, |
| | | Resolver, |
| | | Context, |
| | | FileSystem, |
| | | ResolveContext, |
| | | ResolveRequest, |