UNPKG

877 BTypeScriptView Raw
1// This empty interface serves as a placeholder which userland code can augment to
2// override result types.
3//
4// Currently only available result type which is overridable is Count, which defaults to
5// number | string;
6//
7// Following example in userland code will alter this to be just number:
8//
9// declare module "knex/types/result" {
10// interface Registry {
11// Count: number;
12// }
13// }
14//
15// Prior discussion: https://github.com/tgriesser/knex/issues/3247
16export interface Registry {
17 // We can't actually have default types here
18 // because typescript's augmentation will not permit
19 // overriding the type of a property already present.
20 //
21 // But the effective defaults are documented below:
22 //
23 // Count: number | string;
24 //
25 // Refer to Knex.Lookup type operator to see how the defaults
26 // are actually specified.
27}