Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Export types directly from sqlstring dependency #3047

Merged
merged 8 commits into from
Sep 14, 2024
54 changes: 40 additions & 14 deletions typings/mysql/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,51 @@ export function createPool(config: PoolOptions): BasePool;

export function createPoolCluster(config?: PoolClusterOptions): PoolCluster;

export function escape(value: any): string;

export function escapeId(value: any): string;

/**
* @file index.d.ts
*
* @author marvinhagemeister
* @date 11 July 2017
*
* @dependency \@types/sqlstring
* @see {@link https://www.npmjs.com/package/@types/sqlstring} for more information
*/
export function escape(value: any, stringifyObjects?: boolean, timeZone?: 'local' | NonNullable<unknown>): string;
wellwelwel marked this conversation as resolved.
Show resolved Hide resolved
/**
* @file index.d.ts
*
* @author marvinhagemeister
* @date 11 July 2017
*
* @dependency \@types/sqlstring
* @see {@link https://www.npmjs.com/package/@types/sqlstring} for more information
*/
export function escapeId(value: any, forbidQualified?: boolean): string;
/**
* @file index.d.ts
*
* @author marvinhagemeister
* @date 11 July 2017
*
* @dependency \@types/sqlstring
* @see {@link https://www.npmjs.com/package/@types/sqlstring} for more information
*/
export function format(sql: string): string;
export function format(
sql: string,
values: any[],
stringifyObjects?: boolean,
timeZone?: string,
): string;

export function format(
sql: string,
values: any,
values: any | any[],
stringifyObjects?: boolean,
timeZone?: string,
timeZone?: 'local' | NonNullable<unknown>,
): string;

/**
* @file index.d.ts
ScrapsPrograms marked this conversation as resolved.
Show resolved Hide resolved
*
* @author David Gomes
* @date 3 January 2019
*
* @dependency \@types/sqlstring
* @see {@link https://www.npmjs.com/package/@types/sqlstring} for more information
*/
export function raw(sql: string): {
toSqlString: () => string;
};
Expand Down
Loading