UNPKG

ttsc

Version:

General-purpose TypeScript-Go compiler, runtime, plugin host, and LSP host.

32 lines (31 loc) 1.73 kB
export type FilesystemPathIdentity = { key: string; path: string; }; export type FilesystemPathIdentityOperations = { caseSensitive(directory: string): boolean; platform: NodeJS.Platform; realpath(location: string): string; throwOnRealpathError: boolean; }; export type FilesystemPathIdentityContext = { caseSensitive(directory: string): boolean; isWithin(root: string, candidate: string): boolean; resolve(location: string): FilesystemPathIdentity; }; /** * Create one filesystem-identity resolver for a filesystem transaction. * * Existing segments use their physical spelling. A missing suffix keeps exact * spelling only under a case-sensitive directory; otherwise its canonical * spelling is folded so aliases remain one declaration before they exist. */ export declare function createFilesystemPathIdentityContext(operations?: Partial<FilesystemPathIdentityOperations>): FilesystemPathIdentityContext; export declare function isFilesystemPathIdentityWithin(root: string, candidate: string, platform?: NodeJS.Platform): boolean; export declare function resolveFilesystemPath(location: string, platform?: NodeJS.Platform): string; export type ProjectInputPathIdentity = FilesystemPathIdentity; export type ProjectInputPathIdentityOperations = FilesystemPathIdentityOperations; export type ProjectInputPathIdentityContext = FilesystemPathIdentityContext; export declare function createProjectInputPathIdentityContext(operations?: Partial<ProjectInputPathIdentityOperations>): ProjectInputPathIdentityContext; export declare function isProjectInputPathIdentityWithin(root: string, candidate: string): boolean; export declare function resolveProjectInputPath(location: string): string;