1 |
|
2 | import * as ts from "typescript";
|
3 | import { parseJSON } from "./utils";
|
4 | export { parseJSON };
|
5 | export declare const version: any;
|
6 | export interface Options {
|
7 | dryRun?: boolean;
|
8 | verbose?: boolean;
|
9 | baseDir?: string;
|
10 | replace: boolean;
|
11 | verify: boolean;
|
12 | tsconfig: boolean;
|
13 | tsconfigFile: string | null;
|
14 | tslint: boolean;
|
15 | tslintFile: string | null;
|
16 | editorconfig: boolean;
|
17 | vscode: boolean;
|
18 | vscodeFile: string | null;
|
19 | tsfmt: boolean;
|
20 | tsfmtFile: string | null;
|
21 | }
|
22 | export interface OptionModifier {
|
23 | (fileName: string, opts: Options, formatSettings: ts.FormatCodeSettings): ts.FormatCodeSettings | Promise<ts.FormatCodeSettings>;
|
24 | }
|
25 | export interface PostProcessor {
|
26 | (fileName: string, formattedCode: string, opts: Options, formatSettings: ts.FormatCodeSettings): string | Promise<string>;
|
27 | }
|
28 | export interface ResultMap {
|
29 | [fileName: string]: Result;
|
30 | }
|
31 | export interface Result {
|
32 | fileName: string;
|
33 | settings: ts.FormatCodeSettings | null;
|
34 | message: string;
|
35 | error: boolean;
|
36 | src: string;
|
37 | dest: string;
|
38 | }
|
39 | export declare function processFiles(files: string[], opts: Options): Promise<ResultMap>;
|
40 | export declare function processStream(fileName: string, input: NodeJS.ReadableStream, opts: Options): Promise<Result>;
|
41 | export declare function processString(fileName: string, content: string, opts: Options): Promise<Result>;
|