Lots o refactor

This commit is contained in:
Max Lynch
2015-11-28 18:26:55 -06:00
parent 044a824f29
commit 5b754390f5
35 changed files with 653 additions and 356 deletions
+15 -8
View File
@@ -1,13 +1,20 @@
import {wrap, promisify} from '../util';
import {Plugin, Cordova} from './plugin';
let PLUGIN_REF = 'plugins.toast'
export var Toast = {
// Metadata
@Plugin({
name: 'Toast',
plugin: 'cordova-plugin-x-toast',
pluginRef: 'plugins.toast'
})
export class Toast {
@Cordova({
successIndex: 0,
errIndex: 1
})
static hide;
// Methods
showWithOptions: wrap(PLUGIN_REF, 'showWithOptions', 1, 2),
hide: promisify(PLUGIN_REF, 'hide', 0, 1),
@Cordova({
successIndex: 0,
errIndex: 1
})
static showWithOptions;
}