fix(sqlite): mark optional arguments for executeSql (#2592)

This commit is contained in:
Gustav Bylund 2018-07-13 17:06:51 +02:00 committed by Daniel Sogl
parent 1684202629
commit 565c766813

View File

@ -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;
}