refractor(email-composer): refractor interfaces to avoid duplicates

This commit is contained in:
Ibby 2016-12-06 09:09:00 -05:00
parent 427527a129
commit ad84e758be

View File

@ -2,7 +2,7 @@ import { Cordova, Plugin } from './plugin';
declare var cordova: any; declare var cordova: any;
export interface Email { export interface EmailComposerOptions {
app?: string; app?: string;
@ -62,6 +62,8 @@ export interface Email {
* EmailComposer.open(email); * EmailComposer.open(email);
* *
* ``` * ```
* @interfaces
* EmailComposerOptions
*/ */
@Plugin({ @Plugin({
pluginName: 'EmailComposer', pluginName: 'EmailComposer',
@ -112,7 +114,7 @@ export class EmailComposer {
/** /**
* Displays the email composer pre-filled with data. * Displays the email composer pre-filled with data.
* *
* @param email {Email} Email * @param options {EmailComposerOptions} Email
* @param scope {any?} An optional scope for the promise * @param scope {any?} An optional scope for the promise
* @returns {Promise<any>} Resolves promise when the EmailComposer has been opened * @returns {Promise<any>} Resolves promise when the EmailComposer has been opened
*/ */
@ -120,6 +122,6 @@ export class EmailComposer {
successIndex: 1, successIndex: 1,
errorIndex: 3 errorIndex: 3
}) })
static open(email: Email, scope?: any): Promise<any> { return; } static open(options: EmailComposerOptions, scope?: any): Promise<any> { return; }
} }