eslint-plugin-sonarjs
Version:
30 lines (29 loc) • 1.28 kB
TypeScript
/** The archive owns project semantics; without one use TypeScript's native filesystem probe. */
export declare function isFileSystemCaseSensitive(): boolean;
/** Canonical keys never replace the original paths sent to the filesystem or reported to users. */
export declare function canonicalFileName<T extends string>(fileName: T, caseSensitive?: boolean): T;
export declare function pathsEqual(left: string | undefined, right: string | undefined): boolean;
export declare function pathIsUnder(file: string, root: string): boolean;
/**
* Path-keyed collections preserve spelling and keep their filesystem policy while populated.
* This also preserves response mappings after the replay session ends; clear starts a new context.
*/
export declare class FileSystemMap<K extends string, V> extends Map<K, V> {
#private;
private key;
constructor(entries?: Iterable<readonly [K, V]>);
set(key: K, value: V): this;
get(key: K): V | undefined;
has(key: K): boolean;
delete(key: K): boolean;
clear(): void;
}
export declare class FileSystemSet<K extends string> extends Set<K> {
#private;
private key;
constructor(values?: Iterable<K>);
add(value: K): this;
has(value: K): boolean;
delete(value: K): boolean;
clear(): void;
}