Skip to content

Commit

Permalink
fix(sqlite): mark optional arguments for executeSql (#2592)
Browse files Browse the repository at this point in the history
  • Loading branch information
Maistho authored and danielsogl committed Jul 13, 2018
1 parent 1684202 commit 565c766
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions src/@ionic-native/plugins/sqlite/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,19 @@ 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;
}

/**
* @hidden
*/
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;
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 565c766

Please sign in to comment.