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
23 changes: 12 additions & 11 deletions typings/mysql/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* sqlstring types are based on https://www.npmjs.com/package/@types/sqlstring, version 2.3.2
*/
import { Pool as BasePool, PoolOptions } from './lib/Pool.js';
import {
Connection as BaseConnection,
Expand Down Expand Up @@ -53,23 +56,21 @@ export function createPool(config: PoolOptions): BasePool;

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

export function escape(value: any): string;

export function escapeId(value: any): string;

export function format(sql: string): string;
export function format(
sql: string,
values: any[],
type TimeZone = 'local' | 'Z' | (string & NonNullable<unknown>);
export function escape(
value: any,
stringifyObjects?: boolean,
timeZone?: string,
timeZone?: TimeZone,
): string;

export function escapeId(value: any, forbidQualified?: boolean): string;

export function format(sql: string): string;
export function format(
sql: string,
values: any,
values: any | any[],
stringifyObjects?: boolean,
timeZone?: string,
timeZone?: TimeZone,
): string;

export function raw(sql: string): {
Expand Down
Loading