UNPKG

sql-formatter

Version:

Format whitespace in a SQL query to make it more readable

29 lines (28 loc) 692 B
interface NearleyToken { value: any; [key: string]: any; } interface NearleyLexer { reset: (chunk: string, info: any) => void; next: () => NearleyToken | undefined; save: () => any; formatError: (token: never) => string; has: (tokenType: string) => boolean; } interface NearleyRule { name: string; symbols: NearleySymbol[]; postprocess?: (d: any[], loc?: number, reject?: {}) => any; } type NearleySymbol = string | { literal: any; } | { test: (token: any) => boolean; }; interface Grammar { Lexer: NearleyLexer | undefined; ParserRules: NearleyRule[]; ParserStart: string; } declare const grammar: Grammar; export default grammar;