1 |
|
2 |
|
3 |
|
4 |
|
5 | declare namespace pgMinify {
|
6 |
|
7 | interface IMinifyOptions {
|
8 | compress?: boolean;
|
9 | removeAll?: boolean;
|
10 | }
|
11 |
|
12 | interface IErrorPosition {
|
13 | line: number;
|
14 | column: number;
|
15 | }
|
16 |
|
17 | enum parsingErrorCode {
|
18 | unclosedMLC = 0,
|
19 | unclosedText = 1,
|
20 | unclosedQI = 2,
|
21 | multiLineQI = 3
|
22 | }
|
23 |
|
24 | class SQLParsingError implements Error {
|
25 | name: string;
|
26 | message: string;
|
27 | stack: string;
|
28 | error: string;
|
29 | code: parsingErrorCode;
|
30 | position: IErrorPosition;
|
31 | }
|
32 | }
|
33 |
|
34 | declare function pgMinify(sql: string, options?: pgMinify.IMinifyOptions): string;
|
35 |
|
36 | export = pgMinify;
|