@types/yesql
TypeScript icon, indicating that this package has built-in type declarations

4.1.4 • Public • Published

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

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.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @types/yesql

      Weekly Downloads

      4,532

      Version

      4.1.4

      License

      MIT

      Unpacked Size

      3.98 kB

      Total Files

      5

      Last publish

      Collaborators

      • types