From 544e7ef4fc2cb68f517814305b3c171a1ebfea6a Mon Sep 17 00:00:00 2001 From: Ibby Hadeed Date: Tue, 28 Mar 2017 04:13:29 -0400 Subject: [PATCH] feat(sqlite): add SQLiteDatabaseConfig interface --- src/@ionic-native/plugins/sqlite/index.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/@ionic-native/plugins/sqlite/index.ts b/src/@ionic-native/plugins/sqlite/index.ts index 2baa389ad5..554378ec83 100644 --- a/src/@ionic-native/plugins/sqlite/index.ts +++ b/src/@ionic-native/plugins/sqlite/index.ts @@ -4,6 +4,17 @@ import { Cordova, CordovaInstance, Plugin, CordovaCheck, InstanceProperty } from declare var sqlitePlugin; +export interface SQLiteDatabaseConfig { + /** + * Name of the database + */ + name: string; + /** + * Location of the database + */ + location: string; +} + /** * @hidden */ @@ -160,6 +171,8 @@ export class SQLiteObject { * * @classes * SQLiteObject + * @interfaces + * SQLiteDatabaseConfig */ @Plugin({ pluginName: 'SQLite', @@ -179,7 +192,7 @@ export class SQLite { * @return Promise */ @CordovaCheck() - create(config: any): Promise { + create(config: SQLiteDatabaseConfig): Promise { return new Promise((resolve, reject) => { sqlitePlugin.openDatabase(config, db => resolve(new SQLiteObject(db)), reject); });