@types/yesql
Version:
TypeScript definitions for yesql
44 lines (36 loc) • 1.32 kB
Markdown
# Installation
> `npm install --save @types/yesql`
# Summary
This package contains type definitions for yesql (https://github.com/pihvi/yesql#readme).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yesql.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yesql/index.d.ts)
````ts
declare function readSqlFiles(
dir: string,
options?: {
pg?: boolean | undefined;
type?: "pg" | "mysql" | undefined;
},
): string;
declare namespace readSqlFiles {
type AnyParams = Record<string, any>;
interface Options {
useNullForMissing?: boolean | undefined;
}
function pg<TParams extends object = AnyParams>(
query: string,
options?: Options,
): (params: TParams) => { text: string; values: Array<TParams[keyof TParams]> };
function mysql<TParams extends object = AnyParams>(
query: string,
options?: Options,
): (params: TParams) => { sql: string; values: Array<TParams[keyof TParams]> };
}
export = readSqlFiles;
````
### Additional Details
* Last updated: Tue, 07 Nov 2023 15:11:36 GMT
* Dependencies: none
# Credits
These definitions were written by [Lluís Ulzurrun de Asanza Sáez](https://github.com/Sumolari).