mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-16 08:26:59 +03:00
migrate to typescript
This commit is contained in:
committed by
Dainius Dauksevicius
parent
c462323dd5
commit
08d27265fc
13
src/databases/IDatabase.ts
Normal file
13
src/databases/IDatabase.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
export interface IDatabase {
|
||||
init(): void;
|
||||
|
||||
prepare(type: QueryType, query: string, params: any[]): any;
|
||||
|
||||
get<TModel>(query: string, params: any[]): TModel;
|
||||
getAll<TModel>(query: string, params: any[]): TModel[];
|
||||
run(query: string, params: any[]): void;
|
||||
|
||||
exec(query: string): any;
|
||||
}
|
||||
|
||||
export type QueryType = 'get' | 'all' | 'run';
|
||||
Reference in New Issue
Block a user