UNPKG

690 BTypeScriptView Raw
1declare module "editorconfig" {
2 export interface FileInfo {
3 indent_style?: string;
4 indent_size?: number;
5 tab_width?: number;
6 end_of_line?: string;
7 charset?: string;
8 trim_trailing_whitespace?: boolean;
9 insert_final_newline?: boolean;
10 root?: string;
11 }
12
13 export interface ParseOptions {
14 /* config file name. default: .editorconfig */
15 config: string;
16 version: any; // string or Version
17 }
18
19 export function parseFromFiles(filepath: string, files: any[], options?: ParseOptions): Promise<FileInfo>;
20
21 export function parse(filepath: string, options?: ParseOptions): Promise<FileInfo>;
22}