@idlebox/ignore-edit
Version:
api for modify .*ignore files
31 lines • 1.29 kB
TypeScript
export declare const unscoped: unique symbol;
declare const filePath: unique symbol;
declare const originalContent: unique symbol;
export declare function emptyLine(): symbol;
type ILine = symbol | string;
export interface IIgnoreFile extends IIgnoreFileData, IIterable {
}
interface IIgnoreFileData {
[unscoped]: ILine[];
[filePath]?: string;
[originalContent]: string;
[title: string]: ILine[];
}
interface IIterable {
[Symbol.iterator](): IterableIterator<[string | typeof unscoped, readonly string[]]>;
}
export declare function stringify(data: IIgnoreFile): string;
/** @deprecated */
export declare function saveFileSync(data: IIgnoreFile, saveAs?: string): boolean;
export declare function saveFile(data: IIgnoreFile, saveAs?: string): Promise<boolean>;
export declare function parse(content: string): IIgnoreFile;
export declare function loadFile(file: string, create?: boolean): Promise<IIgnoreFile>;
/** @deprecated */
export declare function loadFileSync(file: string, create?: boolean): IIgnoreFile;
export declare class WrappedArray extends Array<string> {
push(...items: string[]): number;
unshift(...items: string[]): number;
splice(start: number, deleteCount: number, ...items: string[]): string[];
}
export {};
//# sourceMappingURL=api.d.ts.map