diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..539cbd4 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,28 @@ +declare module 'datasource-sql' { + import * as knex from 'knex' + + // attempt at fixing the undefined function 'cache' on QueryBuilder - doesn't improve the situation + // + // interface QueryBuilderEx + // extends QueryBuilder { + // cache(ttl: number): this; + // } + // interface KnexEx + // extends knex { + // []>( + // tableName?: Knex.TableDescriptor | Knex.AliasDict, + // options?: TableOptions + // ): QueryBuilderEx; + // } + + export class SQLDataSource { + knex: knex + // for above attempt - knex: KnexEx + + constructor(...args: any[]); + + cacheQuery(...args: any[]): void; + + initialize(...args: any[]): void; + } +}