UNPKG

sql-formatter

Version:

Format whitespace in a SQL query to make it more readable

18 lines (17 loc) 683 B
import { IndentStyle } from '../types'; import { Token } from './token'; /** * When tabular style enabled, * produces a 10-char wide version of reserved token. * * It'll be padded by zero-width space characters * instead of normal spaces, so that these spaces will survive * trimming of spaces in other parts of formatter. * They'll be converted to normal spaces in the end of * all the normal formatting with the replaceTabularPlaceholders() */ export declare function toTabularToken(token: Token, indentStyle: IndentStyle): Token; /** * Replaces zero-width-spaces added by the above function */ export declare function replaceTabularPlaceholders(query: string): string;