Skip to content

Commit

Permalink
types
Browse files Browse the repository at this point in the history
  • Loading branch information
wmertens committed Jul 13, 2023
1 parent 5982114 commit a79361c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ declare module 'strato-db'

type EventEmitter = import('events').EventEmitter

type DBCallback = (db: DB) => Promise<void> | void
type DBCallback = (db: DB) => Promise<unknown> | unknown
/** The types that SQLite can handle as parameter values */
type SQLiteValue = string | number | null
type SQLiteParam = SQLiteValue | boolean
Expand All @@ -16,7 +16,7 @@ type SQLiteColumnType =
| 'BLOB'
| 'JSON'

type DBEachCallback = (row: SQLiteRow) => Promise<void> | void
type DBEachCallback = (row: SQLiteRow) => Promise<unknown> | unknown

type SqlTag = (
tpl: TemplateStringsArray,
Expand Down Expand Up @@ -46,9 +46,9 @@ type SQLiteOptions = {
/** verbose errors. */
verbose?: boolean
/** called before opening. */
onWillOpen?: (...params: any[]) => any
onWillOpen?: () => Promise<unknown> | unknown
/** called after opened. */
onDidOpen?: (...params: any[]) => any
onDidOpen?: DBCallback
/** name for debugging. */
name?: string
/** run incremental vacuum. */
Expand Down

0 comments on commit a79361c

Please sign in to comment.