mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-04-25 04:16:09 +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 {
|
export interface DbTransaction {
|
||||||
executeSql: (
|
executeSql: (
|
||||||
sql: any,
|
sql: any,
|
||||||
values: any,
|
values?: any[],
|
||||||
success: Function,
|
success?: Function,
|
||||||
error: Function
|
error?: Function
|
||||||
) => void;
|
) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -50,12 +50,7 @@ export interface DbTransaction {
|
|||||||
*/
|
*/
|
||||||
export interface SQLiteTransaction extends DbTransaction {
|
export interface SQLiteTransaction extends DbTransaction {
|
||||||
start: () => void;
|
start: () => void;
|
||||||
addStatement: (
|
addStatement: DbTransaction['executeSql'];
|
||||||
sql: any,
|
|
||||||
values: any,
|
|
||||||
success: Function,
|
|
||||||
error: Function
|
|
||||||
) => void;
|
|
||||||
handleStatementSuccess: (handler: Function, response: any) => void;
|
handleStatementSuccess: (handler: Function, response: any) => void;
|
||||||
handleStatementFailure: (handler: Function, response: any) => void;
|
handleStatementFailure: (handler: Function, response: any) => void;
|
||||||
run: () => void;
|
run: () => void;
|
||||||
@ -126,7 +121,7 @@ export class SQLiteObject {
|
|||||||
* ensure it resolved and successfully opened the database.
|
* ensure it resolved and successfully opened the database.
|
||||||
*/
|
*/
|
||||||
@CordovaInstance()
|
@CordovaInstance()
|
||||||
executeSql(statement: string, params: any): Promise<any> {
|
executeSql(statement: string, params?: any[]): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user