Skip to content

Commit d753e88

Browse files
author
Snowflake107
committed
types
1 parent 4c7ae7b commit d753e88

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

typings/index.d.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ import { AST } from 'node-sql-parser';
33
declare module '@devsnowflake/jsql' {
44
export interface Handlers {
55
create: (q: AST, db: Database) => void;
6-
select: (q: AST, db: Database) => any[];
6+
select: (q: AST, db: Database) => SelectOperation[] & ParseFunction;
77
insert: (q: AST, db: Database) => void;
88
drop: (q: AST, db: Database) => boolean;
99
update: (q: AST, db: Database) => void;
1010
delete: (q: AST, db: Database) => void;
1111
}
1212

13+
export type SelectOperation = any[];
14+
export type ParseFunction = () => any[];
15+
1316
export interface DatabasePrepare {
1417
ast: AST | AST[];
1518
run: () => any;

0 commit comments

Comments
 (0)