UNPKG

3.39 kBSource Map (JSON)View Raw
1{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../src/@ionic-native/core/decorators/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["export interface PluginConfig {\n /**\n * Plugin name, this should match the class name\n */\n pluginName: string;\n /**\n * Plugin NPM package name\n */\n plugin: string;\n /**\n * Plugin object reference\n */\n pluginRef?: string;\n /**\n * Github repository URL\n */\n repo?: string;\n /**\n * Custom install command\n */\n install?: string;\n /**\n * Available installation variables\n */\n installVariables?: string[];\n /**\n * Supported platforms\n */\n platforms?: string[];\n\n [key: string]: any;\n}\n\nexport interface CordovaOptions {\n destruct?: boolean;\n /**\n * If the method-name of the cordova plugin is different from the wrappers one, it can be defined here\n */\n methodName?: string;\n /**\n * Set to true if the wrapped method is a sync function\n */\n sync?: boolean;\n /**\n * Callback order. Set to reverse if the success/error callbacks are the first 2 arguments that the wrapped method\n * takes.\n */\n callbackOrder?: 'reverse';\n /**\n * Callback style\n */\n callbackStyle?: 'node' | 'object';\n /**\n * Set a custom index for the success callback function. This doesn't work if callbackOrder or callbackStyle are set.\n */\n successIndex?: number;\n /**\n * Set a custom index for the error callback function. This doesn't work if callbackOrder or callbackStyle are set.\n */\n errorIndex?: number;\n /**\n * Success function property name. This must be set if callbackStyle is set to object.\n */\n successName?: string;\n /**\n * Error function property name. This must be set if callbackStyle is set to object.\n */\n errorName?: string;\n /**\n * Set to true to return an observable\n */\n observable?: boolean;\n /**\n * If observable is set to true, this can be set to a different function name that will cancel the observable.\n */\n clearFunction?: string;\n /**\n * This can be used if clearFunction is set. Set this to true to call the clearFunction with the same arguments used\n * in the initial function.\n */\n clearWithArgs?: boolean;\n /**\n * Creates an observable that wraps a global event. Replaces document.addEventListener\n */\n eventObservable?: boolean;\n /**\n * Event name, this must be set if eventObservable is set to true\n */\n event?: string;\n /**\n * Element to attach the event listener to, this is optional, defaults to `window`\n */\n element?: any;\n /**\n * Set to true if the wrapped method returns a promise\n */\n otherPromise?: boolean;\n /**\n * Supported platforms\n */\n platforms?: string[];\n}\n\nexport declare const Plugin: (config: PluginConfig) => ClassDecorator;\nexport declare const Cordova: (config?: CordovaOptions) => MethodDecorator;\nexport declare const CordovaProperty: () => PropertyDecorator;\nexport declare const CordovaInstance: (config?: CordovaOptions) => MethodDecorator;\nexport declare const InstanceProperty: () => PropertyDecorator;\nexport declare const CordovaCheck: (config?: CordovaOptions) => MethodDecorator;\nexport declare const InstanceCheck: (config?: CordovaOptions) => MethodDecorator;\nexport declare const CordovaFunctionOverride: () => MethodDecorator;\n"]}
\No newline at end of file