Skip to content

Commit

Permalink
Add type definitions file
Browse files Browse the repository at this point in the history
Refs #80
  • Loading branch information
nene committed Feb 1, 2021
1 parent 3d26b2f commit 6ea7784
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Format whitespace in a SQL query to make it more readable",
"license": "MIT",
"main": "lib/sqlFormatter.js",
"types": "src/sqlFormatter.d.ts",
"bin": {
"sql-formatter": "./bin/sqlfmt.js"
},
Expand Down
19 changes: 19 additions & 0 deletions src/sqlFormatter.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export interface FormatOptions {
language?:
| 'db2'
| 'mariadb'
| 'mysql'
| 'n1ql'
| 'plsql'
| 'postgresql'
| 'redshift'
| 'spark'
| 'sql'
| 'tsql';
params?: { [x: string]: string } | string[];
indent?: string;
uppercase?: boolean;
linesBetweenQueries?: number;
}

export function format(sql: string, options?: FormatOptions): string;

0 comments on commit 6ea7784

Please sign in to comment.