mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-05-02 00:07:23 +08:00
chore(): cleanup return values
Addresses https://github.com/driftyco/ionic-native/issues/38.
This commit is contained in:
+18
-123
@@ -48,14 +48,9 @@ export class Calendar {
|
||||
* @return Returns a Promise
|
||||
*/
|
||||
@Cordova()
|
||||
static createCalendar(nameOrOptions: string | { calendarName: string, calendarColor: string }) {
|
||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
||||
// knows that the correct return type is Promise, because there's no way
|
||||
// for it to know the return type from a decorator.
|
||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
||||
return new Promise<any>((res, rej) => {});
|
||||
}
|
||||
static createCalendar(
|
||||
nameOrOptions: string | { calendarName: string, calendarColor: string }
|
||||
): Promise<any> { return }
|
||||
|
||||
/**
|
||||
* Delete a calendar. (iOS only)
|
||||
@@ -72,14 +67,7 @@ export class Calendar {
|
||||
* @return Returns a Promise
|
||||
*/
|
||||
@Cordova()
|
||||
static deleteCalendar(name: string) {
|
||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
||||
// knows that the correct return type is Promise, because there's no way
|
||||
// for it to know the return type from a decorator.
|
||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
||||
return new Promise<any>((res, rej) => {});
|
||||
}
|
||||
static deleteCalendar(name: string): Promise<any> { return }
|
||||
|
||||
/**
|
||||
* Returns the default calendar options.
|
||||
@@ -127,14 +115,7 @@ export class Calendar {
|
||||
notes?: string,
|
||||
startDate?: Date,
|
||||
endDate?: Date
|
||||
) {
|
||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
||||
// knows that the correct return type is Promise, because there's no way
|
||||
// for it to know the return type from a decorator.
|
||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
||||
return new Promise<any>((res, rej) => {});
|
||||
}
|
||||
): Promise<any> { return }
|
||||
|
||||
/**
|
||||
* Silently create an event with additional options.
|
||||
@@ -155,14 +136,7 @@ export class Calendar {
|
||||
startDate?: Date,
|
||||
endDate?: Date,
|
||||
options?: CalendarOptions
|
||||
) {
|
||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
||||
// knows that the correct return type is Promise, because there's no way
|
||||
// for it to know the return type from a decorator.
|
||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
||||
return new Promise<any>((res, rej) => {});
|
||||
}
|
||||
): Promise<any> { return }
|
||||
|
||||
/**
|
||||
* Interactively create an event.
|
||||
@@ -181,14 +155,7 @@ export class Calendar {
|
||||
notes?: string,
|
||||
startDate?: Date,
|
||||
endDate?: Date
|
||||
) {
|
||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
||||
// knows that the correct return type is Promise, because there's no way
|
||||
// for it to know the return type from a decorator.
|
||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
||||
return new Promise<any>((res, rej) => {});
|
||||
}
|
||||
): Promise<any> { return }
|
||||
|
||||
/**
|
||||
* Interactively create an event with additional options.
|
||||
@@ -209,14 +176,7 @@ export class Calendar {
|
||||
startDate?: Date,
|
||||
endDate?: Date,
|
||||
options?: CalendarOptions
|
||||
) {
|
||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
||||
// knows that the correct return type is Promise, because there's no way
|
||||
// for it to know the return type from a decorator.
|
||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
||||
return new Promise<any>((res, rej) => {});
|
||||
}
|
||||
): Promise<any> { return }
|
||||
|
||||
// deprecated
|
||||
// @Cordova()
|
||||
@@ -246,14 +206,7 @@ export class Calendar {
|
||||
notes?: string,
|
||||
startDate?: Date,
|
||||
endDate?: Date
|
||||
) {
|
||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
||||
// knows that the correct return type is Promise, because there's no way
|
||||
// for it to know the return type from a decorator.
|
||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
||||
return new Promise<any>((res, rej) => {});
|
||||
}
|
||||
): Promise<any> { return }
|
||||
|
||||
/**
|
||||
* Find an event with additional options.
|
||||
@@ -274,14 +227,7 @@ export class Calendar {
|
||||
startDate?: Date,
|
||||
endDate?: Date,
|
||||
options?: CalendarOptions
|
||||
) {
|
||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
||||
// knows that the correct return type is Promise, because there's no way
|
||||
// for it to know the return type from a decorator.
|
||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
||||
return new Promise<any>((res, rej) => {});
|
||||
}
|
||||
): Promise<any> { return }
|
||||
|
||||
/**
|
||||
* Find a list of events within the specified date range. (Android only)
|
||||
@@ -291,37 +237,21 @@ export class Calendar {
|
||||
* @return Returns a Promise that resolves with the list of events, or rejects with an error.
|
||||
*/
|
||||
@Cordova()
|
||||
static listEventsInRange(startDate: Date, endDate: Date) {
|
||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
||||
// knows that the correct return type is Promise, because there's no way
|
||||
// for it to know the return type from a decorator.
|
||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
||||
return new Promise<any>((res, rej) => {});
|
||||
}
|
||||
static listEventsInRange(startDate: Date, endDate: Date): Promise<any> { return }
|
||||
|
||||
/**
|
||||
* Get a list of all calendars.
|
||||
* @return A Promise that resolves with the list of calendars, or rejects with an error.
|
||||
*/
|
||||
@Cordova()
|
||||
static listCalendars(){
|
||||
return new Promise<any>((res, rej) => {});
|
||||
}
|
||||
static listCalendars(){ return }
|
||||
|
||||
/**
|
||||
* Get a list of all future events in the specified calendar. (iOS only)
|
||||
* @return Returns a Promise that resolves with the list of events, or rejects with an error.
|
||||
*/
|
||||
@Cordova()
|
||||
static findAllEventsInNamedCalendar(calendarName: string) {
|
||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
||||
// knows that the correct return type is Promise, because there's no way
|
||||
// for it to know the return type from a decorator.
|
||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
||||
return new Promise<any>((res, rej) => {});
|
||||
}
|
||||
static findAllEventsInNamedCalendar(calendarName: string): Promise<any> { return }
|
||||
|
||||
/**
|
||||
* Modify an event. (iOS only)
|
||||
@@ -350,14 +280,7 @@ export class Calendar {
|
||||
newNotes?: string,
|
||||
newStartDate?: Date,
|
||||
newEndDate?: Date
|
||||
) {
|
||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
||||
// knows that the correct return type is Promise, because there's no way
|
||||
// for it to know the return type from a decorator.
|
||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
||||
return new Promise<any>((res, rej) => {});
|
||||
}
|
||||
): Promise<any> { return }
|
||||
|
||||
/**
|
||||
* Modify an event with additional options. (iOS only)
|
||||
@@ -388,14 +311,7 @@ export class Calendar {
|
||||
newStartDate?: Date,
|
||||
newEndDate?: Date,
|
||||
options?: CalendarOptions
|
||||
) {
|
||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
||||
// knows that the correct return type is Promise, because there's no way
|
||||
// for it to know the return type from a decorator.
|
||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
||||
return new Promise<any>((res, rej) => {});
|
||||
}
|
||||
) { return }
|
||||
|
||||
/**
|
||||
* Delete an event.
|
||||
@@ -414,14 +330,7 @@ export class Calendar {
|
||||
notes?: string,
|
||||
startDate?: Date,
|
||||
endDate?: Date
|
||||
) {
|
||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
||||
// knows that the correct return type is Promise, because there's no way
|
||||
// for it to know the return type from a decorator.
|
||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
||||
return new Promise<any>((res, rej) => {});
|
||||
}
|
||||
): Promise<any> { return }
|
||||
|
||||
/**
|
||||
* Delete an event from the specified Calendar. (iOS only)
|
||||
@@ -442,26 +351,12 @@ export class Calendar {
|
||||
startDate?: Date,
|
||||
endDate?: Date,
|
||||
calendarName?: string
|
||||
) {
|
||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
||||
// knows that the correct return type is Promise, because there's no way
|
||||
// for it to know the return type from a decorator.
|
||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
||||
return new Promise<any>((res, rej) => {});
|
||||
}
|
||||
): Promise<any> { return }
|
||||
|
||||
/**
|
||||
* Open the calendar at the specified date.
|
||||
* @return {Date} date
|
||||
*/
|
||||
@Cordova()
|
||||
static openCalendar(date: Date) {
|
||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
||||
// knows that the correct return type is Promise, because there's no way
|
||||
// for it to know the return type from a decorator.
|
||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
||||
return new Promise<any>((res, rej) => {});
|
||||
}
|
||||
static openCalendar(date: Date): Promise<any> { return }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user