mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-31 18:49:43 +08:00
fix(sqlite): mark optional arguments for executeSql (#2592)
This commit is contained in:
parent
1684202629
commit
565c766813
@ -38,11 +38,11 @@ export interface SQLiteDatabaseConfig {
|
||||
*/
|
||||
export interface DbTransaction {
|
||||
executeSql: (
|
||||
sql: any,
|
||||
values: any,
|
||||
success: Function,
|
||||
error: Function
|
||||
) => void;
|
||||
sql: any,
|
||||
values?: any[],
|
||||
success?: Function,
|
||||
error?: Function
|
||||
) => void;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -50,12 +50,7 @@ export interface DbTransaction {
|
||||
*/
|
||||
export interface SQLiteTransaction extends DbTransaction {
|
||||
start: () => void;
|
||||
addStatement: (
|
||||
sql: any,
|
||||
values: any,
|
||||
success: Function,
|
||||
error: Function
|
||||
) => void;
|
||||
addStatement: DbTransaction['executeSql'];
|
||||
handleStatementSuccess: (handler: Function, response: any) => void;
|
||||
handleStatementFailure: (handler: Function, response: any) => void;
|
||||
run: () => void;
|
||||
@ -126,7 +121,7 @@ export class SQLiteObject {
|
||||
* ensure it resolved and successfully opened the database.
|
||||
*/
|
||||
@CordovaInstance()
|
||||
executeSql(statement: string, params: any): Promise<any> {
|
||||
executeSql(statement: string, params?: any[]): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user