This defintion is from work by @eioo on this pull request Kequc/knex-stringcase#14 which the maintainer decided to decline only after making the contributor go through several revisions. I have no desire to maintain a @types package, but please feel free to copy and use as needed.
Created
September 4, 2021 01:18
-
-
Save shellscape/be55ec79975ecf6564a7ffb58997f575 to your computer and use it in GitHub Desktop.
knex-stringcase TypeScript Definition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module 'knex-stringcase' { | |
import { Conventions } from 'stringcase'; | |
type StringcaseFn = (str: string) => string; | |
type Stringcase = Conventions | StringcaseFn | (Conventions | StringcaseFn)[] | |
interface IKnexStringCaseConfig { | |
appStringcase?: Stringcase; | |
dbStringcase?: Stringcase; | |
beforePostProcessResponse?(result: any[] | object, queryContext: object): any[] | object; | |
beforeWrapIdentifier?(value: string, queryContext: object): string; | |
ignoreStringcase?(obj: object): boolean; | |
} | |
function knexStringcase<T>(config: T & IKnexStringCaseConfig): T; | |
export = knexStringcase; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment