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