chore(): cleanup return values
Addresses https://github.com/driftyco/ionic-native/issues/38.
This commit is contained in:
parent
78fdbcd42e
commit
998a58e036
@ -28,14 +28,7 @@ export class BarcodeScanner {
|
|||||||
* @return Returns a Promise that resolves with scanner data, or rejects with an error.
|
* @return Returns a Promise that resolves with scanner data, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static scan(){
|
static scan(): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
};
|
|
||||||
|
|
||||||
// Not well supported
|
// Not well supported
|
||||||
// @Cordova()
|
// @Cordova()
|
||||||
|
@ -181,14 +181,7 @@ export class BLE {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true
|
observable: true
|
||||||
})
|
})
|
||||||
static scan(services:string[], seconds:number) {
|
static scan(services: string[], seconds: number): Observable<any> { return }
|
||||||
// This Observable 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 Observable, 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 Observable<any>(observer => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Scan and discover BLE peripherals until `stopScan` is called.
|
* Scan and discover BLE peripherals until `stopScan` is called.
|
||||||
@ -211,14 +204,7 @@ export class BLE {
|
|||||||
clearFunction: 'stopScan',
|
clearFunction: 'stopScan',
|
||||||
clearWithArgs: true
|
clearWithArgs: true
|
||||||
})
|
})
|
||||||
static startScan(services:string[]){
|
static startScan(services: string[]): Observable<any> { return }
|
||||||
// This Observable 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 Observable, 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 Observable<any>(observer => {});
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop a scan started by `startScan`.
|
* Stop a scan started by `startScan`.
|
||||||
@ -235,14 +221,7 @@ export class BLE {
|
|||||||
* @return returns a Promise.
|
* @return returns a Promise.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static stopScan(){
|
static stopScan(): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect to a peripheral.
|
* Connect to a peripheral.
|
||||||
@ -263,14 +242,7 @@ export class BLE {
|
|||||||
clearFunction: 'disconnect',
|
clearFunction: 'disconnect',
|
||||||
clearWithArgs: true
|
clearWithArgs: true
|
||||||
})
|
})
|
||||||
static connect(deviceId:string){
|
static connect(deviceId: string): Observable<any> { return }
|
||||||
// This Observable 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 Observable, 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 Observable<any>(observer => {});
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disconnect from a peripheral.
|
* Disconnect from a peripheral.
|
||||||
@ -284,14 +256,7 @@ export class BLE {
|
|||||||
* @return Returns a Promise
|
* @return Returns a Promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static disconnect(deviceId:string) {
|
static disconnect(deviceId: string): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read the value of a characteristic.
|
* Read the value of a characteristic.
|
||||||
@ -302,14 +267,11 @@ export class BLE {
|
|||||||
* @return Returns a Promise
|
* @return Returns a Promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static read(deviceId:string, serviceUUID:string, characteristicUUID:string){
|
static read(
|
||||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
deviceId: string,
|
||||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
serviceUUID: string,
|
||||||
// knows that the correct return type is Promise, because there's no way
|
characteristicUUID: string
|
||||||
// for it to know the return type from a decorator.
|
): Promise<any> { return };
|
||||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
|
||||||
return new Promise<any>((res, rej) => {});
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write the value of a characteristic.
|
* Write the value of a characteristic.
|
||||||
@ -340,14 +302,12 @@ export class BLE {
|
|||||||
* @return Returns a Promise
|
* @return Returns a Promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static write(deviceId:string, serviceUUID:string, characteristicUUID:string, value:ArrayBuffer){
|
static write(
|
||||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
deviceId: string,
|
||||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
serviceUUID: string,
|
||||||
// knows that the correct return type is Promise, because there's no way
|
characteristicUUID: string,
|
||||||
// for it to know the return type from a decorator.
|
value: ArrayBuffer
|
||||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
): Promise<any> { return }
|
||||||
return new Promise<any>((res, rej) => {});
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write the value of a characteristic without waiting for confirmation from the peripheral.
|
* Write the value of a characteristic without waiting for confirmation from the peripheral.
|
||||||
@ -359,14 +319,12 @@ export class BLE {
|
|||||||
* @return Returns a Promise
|
* @return Returns a Promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static writeWithoutResponse(deviceId:string, serviceUUID:string, characteristicUUID:string, value:ArrayBuffer){
|
static writeWithoutResponse(
|
||||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
deviceId: string,
|
||||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
serviceUUID: string,
|
||||||
// knows that the correct return type is Promise, because there's no way
|
characteristicUUID: string,
|
||||||
// for it to know the return type from a decorator.
|
value: ArrayBuffer
|
||||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
): Promise<any> { return }
|
||||||
return new Promise<any>((res, rej) => {});
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register to be notified when the value of a characteristic changes.
|
* Register to be notified when the value of a characteristic changes.
|
||||||
@ -388,14 +346,11 @@ export class BLE {
|
|||||||
clearFunction: 'stopNotification',
|
clearFunction: 'stopNotification',
|
||||||
clearWithArgs: true
|
clearWithArgs: true
|
||||||
})
|
})
|
||||||
static startNotification(deviceId:string, serviceUUID:string, characteristicUUID:string){
|
static startNotification(
|
||||||
// This Observable is replaced by one from the @Cordova decorator that wraps
|
deviceId: string,
|
||||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
serviceUUID: string,
|
||||||
// knows that the correct return type is Observable, because there's no way
|
characteristicUUID: string
|
||||||
// for it to know the return type from a decorator.
|
): Observable<any> { return }
|
||||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
|
||||||
return new Observable<any>(observer => {});
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop being notified when the value of a characteristic changes.
|
* Stop being notified when the value of a characteristic changes.
|
||||||
@ -406,14 +361,11 @@ export class BLE {
|
|||||||
* @return Returns a Promise.
|
* @return Returns a Promise.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static stopNotification(deviceId:string, serviceUUID:string, characteristicUUID:string){
|
static stopNotification(
|
||||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
deviceId: string,
|
||||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
serviceUUID: string,
|
||||||
// knows that the correct return type is Promise, because there's no way
|
characteristicUUID: string
|
||||||
// for it to know the return type from a decorator.
|
): Promise<any> { return }
|
||||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
|
||||||
return new Promise<any>((res, rej) => {});
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Report the connection status.
|
* Report the connection status.
|
||||||
@ -429,14 +381,7 @@ export class BLE {
|
|||||||
* @return Returns a Promise.
|
* @return Returns a Promise.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isConnected(deviceId:string){
|
static isConnected(deviceId: string): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Report if bluetooth is enabled.
|
* Report if bluetooth is enabled.
|
||||||
@ -451,14 +396,7 @@ export class BLE {
|
|||||||
* @return Returns a Promise.
|
* @return Returns a Promise.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isEnabled(){
|
static isEnabled(): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open System Bluetooth settings (Android only).
|
* Open System Bluetooth settings (Android only).
|
||||||
@ -466,14 +404,7 @@ export class BLE {
|
|||||||
* @return Returns a Promise.
|
* @return Returns a Promise.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static showBluetoothSettings(){
|
static showBluetoothSettings(): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable Bluetooth on the device (Android only).
|
* Enable Bluetooth on the device (Android only).
|
||||||
@ -481,12 +412,5 @@ export class BLE {
|
|||||||
* @return Returns a Promise.
|
* @return Returns a Promise.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static enable(){
|
static enable(): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -48,14 +48,9 @@ export class Calendar {
|
|||||||
* @return Returns a Promise
|
* @return Returns a Promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static createCalendar(nameOrOptions: string | { calendarName: string, calendarColor: string }) {
|
static createCalendar(
|
||||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
nameOrOptions: string | { calendarName: string, calendarColor: string }
|
||||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete a calendar. (iOS only)
|
* Delete a calendar. (iOS only)
|
||||||
@ -72,14 +67,7 @@ export class Calendar {
|
|||||||
* @return Returns a Promise
|
* @return Returns a Promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static deleteCalendar(name: string) {
|
static deleteCalendar(name: string): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the default calendar options.
|
* Returns the default calendar options.
|
||||||
@ -127,14 +115,7 @@ export class Calendar {
|
|||||||
notes?: string,
|
notes?: string,
|
||||||
startDate?: Date,
|
startDate?: Date,
|
||||||
endDate?: Date
|
endDate?: Date
|
||||||
) {
|
): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Silently create an event with additional options.
|
* Silently create an event with additional options.
|
||||||
@ -155,14 +136,7 @@ export class Calendar {
|
|||||||
startDate?: Date,
|
startDate?: Date,
|
||||||
endDate?: Date,
|
endDate?: Date,
|
||||||
options?: CalendarOptions
|
options?: CalendarOptions
|
||||||
) {
|
): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interactively create an event.
|
* Interactively create an event.
|
||||||
@ -181,14 +155,7 @@ export class Calendar {
|
|||||||
notes?: string,
|
notes?: string,
|
||||||
startDate?: Date,
|
startDate?: Date,
|
||||||
endDate?: Date
|
endDate?: Date
|
||||||
) {
|
): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interactively create an event with additional options.
|
* Interactively create an event with additional options.
|
||||||
@ -209,14 +176,7 @@ export class Calendar {
|
|||||||
startDate?: Date,
|
startDate?: Date,
|
||||||
endDate?: Date,
|
endDate?: Date,
|
||||||
options?: CalendarOptions
|
options?: CalendarOptions
|
||||||
) {
|
): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
// deprecated
|
// deprecated
|
||||||
// @Cordova()
|
// @Cordova()
|
||||||
@ -246,14 +206,7 @@ export class Calendar {
|
|||||||
notes?: string,
|
notes?: string,
|
||||||
startDate?: Date,
|
startDate?: Date,
|
||||||
endDate?: Date
|
endDate?: Date
|
||||||
) {
|
): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find an event with additional options.
|
* Find an event with additional options.
|
||||||
@ -274,14 +227,7 @@ export class Calendar {
|
|||||||
startDate?: Date,
|
startDate?: Date,
|
||||||
endDate?: Date,
|
endDate?: Date,
|
||||||
options?: CalendarOptions
|
options?: CalendarOptions
|
||||||
) {
|
): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find a list of events within the specified date range. (Android only)
|
* 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.
|
* @return Returns a Promise that resolves with the list of events, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static listEventsInRange(startDate: Date, endDate: Date) {
|
static listEventsInRange(startDate: Date, endDate: Date): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a list of all calendars.
|
* Get a list of all calendars.
|
||||||
* @return A Promise that resolves with the list of calendars, or rejects with an error.
|
* @return A Promise that resolves with the list of calendars, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static listCalendars(){
|
static listCalendars(){ return }
|
||||||
return new Promise<any>((res, rej) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a list of all future events in the specified calendar. (iOS only)
|
* 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.
|
* @return Returns a Promise that resolves with the list of events, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static findAllEventsInNamedCalendar(calendarName: string) {
|
static findAllEventsInNamedCalendar(calendarName: string): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Modify an event. (iOS only)
|
* Modify an event. (iOS only)
|
||||||
@ -350,14 +280,7 @@ export class Calendar {
|
|||||||
newNotes?: string,
|
newNotes?: string,
|
||||||
newStartDate?: Date,
|
newStartDate?: Date,
|
||||||
newEndDate?: Date
|
newEndDate?: Date
|
||||||
) {
|
): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Modify an event with additional options. (iOS only)
|
* Modify an event with additional options. (iOS only)
|
||||||
@ -388,14 +311,7 @@ export class Calendar {
|
|||||||
newStartDate?: Date,
|
newStartDate?: Date,
|
||||||
newEndDate?: Date,
|
newEndDate?: Date,
|
||||||
options?: CalendarOptions
|
options?: CalendarOptions
|
||||||
) {
|
) { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete an event.
|
* Delete an event.
|
||||||
@ -414,14 +330,7 @@ export class Calendar {
|
|||||||
notes?: string,
|
notes?: string,
|
||||||
startDate?: Date,
|
startDate?: Date,
|
||||||
endDate?: Date
|
endDate?: Date
|
||||||
) {
|
): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete an event from the specified Calendar. (iOS only)
|
* Delete an event from the specified Calendar. (iOS only)
|
||||||
@ -442,26 +351,12 @@ export class Calendar {
|
|||||||
startDate?: Date,
|
startDate?: Date,
|
||||||
endDate?: Date,
|
endDate?: Date,
|
||||||
calendarName?: string
|
calendarName?: string
|
||||||
) {
|
): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open the calendar at the specified date.
|
* Open the calendar at the specified date.
|
||||||
* @return {Date} date
|
* @return {Date} date
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static openCalendar(date: Date) {
|
static openCalendar(date: Date): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -115,14 +115,7 @@ export class Camera {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
static getPicture(options: CameraOptions){
|
static getPicture(options: CameraOptions): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove intermediate image files that are kept in temporary storage after calling camera.getPicture.
|
* Remove intermediate image files that are kept in temporary storage after calling camera.getPicture.
|
||||||
|
@ -37,17 +37,13 @@ export class Clipboard {
|
|||||||
* @returns {Promise<T>}
|
* @returns {Promise<T>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static copy(text : string) : Promise<any> {
|
static copy(text: string): Promise<any> { return }
|
||||||
return new Promise((res, resj) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pastes the text stored in clipboard
|
* Pastes the text stored in clipboard
|
||||||
* @returns {Promise<T>}
|
* @returns {Promise<T>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static paste() : Promise<any> {
|
static paste(): Promise<any> { return }
|
||||||
return new Promise((res, rej) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -246,26 +246,13 @@ export class Contacts {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex: 2
|
||||||
})
|
})
|
||||||
static find(fields: string[], options?: any){
|
static find(fields: string[], options?: any): Promise<any> { return }
|
||||||
// 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<Contact[]>((res, rej) => {});
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Select a single Contact.
|
* Select a single Contact.
|
||||||
* @return Returns a Promise that resolves with the selected Contact
|
* @return Returns a Promise that resolves with the selected Contact
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static pickContact(){
|
static pickContact(): Promise<any> { return }
|
||||||
// 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<Contact>((res, rej) => {});
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
@ -99,13 +99,6 @@ export class DatePicker {
|
|||||||
* @returns {Promise<Date>} Returns a promise that resolves with the picked date and/or time, or rejects with an error.
|
* @returns {Promise<Date>} Returns a promise that resolves with the picked date and/or time, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static show(options: datePickerOptions): Promise<Date> {
|
static show(options: datePickerOptions): Promise<Date> { return }
|
||||||
// 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<Date>((res, rej) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
@ -50,7 +50,5 @@ export class Device {
|
|||||||
* @returns {Object} The device object.
|
* @returns {Object} The device object.
|
||||||
*/
|
*/
|
||||||
@CordovaProperty
|
@CordovaProperty
|
||||||
static get device() {
|
static get device() { return window.device; }
|
||||||
return window.device;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -72,14 +72,7 @@ export class DeviceMotion {
|
|||||||
* @returns {Promise<any>} Returns object with x, y, z, and timestamp properties
|
* @returns {Promise<any>} Returns object with x, y, z, and timestamp properties
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getCurrentAcceleration () : Promise<accelerationData> {
|
static getCurrentAcceleration(): Promise<accelerationData> { return }
|
||||||
// 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<accelerationData>((res, rej) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Watch the device acceleration. Clear the watch by unsubscribing from the observable.
|
* Watch the device acceleration. Clear the watch by unsubscribing from the observable.
|
||||||
@ -101,12 +94,5 @@ export class DeviceMotion {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'clearWatch'
|
clearFunction: 'clearWatch'
|
||||||
})
|
})
|
||||||
static watchAcceleration (options? : accelerometerOptions) : Observable<accelerationData> {
|
static watchAcceleration (options?: accelerometerOptions): Observable<accelerationData> { return }
|
||||||
// This Observable 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 PrObservableomise, 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 Observable<accelerationData>(observer => {});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -74,14 +74,7 @@ export class DeviceOrientation {
|
|||||||
* @returns {Promise<CompassHeading>}
|
* @returns {Promise<CompassHeading>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getCurrentHeading() : Promise<CompassHeading> {
|
static getCurrentHeading(): Promise<CompassHeading> { return }
|
||||||
// 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<CompassHeading>((res, rej) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the device current heading at a regular interval
|
* Get the device current heading at a regular interval
|
||||||
@ -95,13 +88,6 @@ export class DeviceOrientation {
|
|||||||
observable: true,
|
observable: true,
|
||||||
cancelFunction: 'clearWatch'
|
cancelFunction: 'clearWatch'
|
||||||
})
|
})
|
||||||
static watchHeading(options? : CompassOptions) : Observable<CompassHeading> {
|
static watchHeading(options?: CompassOptions): Observable<CompassHeading> { return }
|
||||||
// This Observable 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 Observable, 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 Observable<CompassHeading>(observer => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -42,14 +42,11 @@ export class Dialogs {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 4
|
errorIndex: 4
|
||||||
})
|
})
|
||||||
static alert(message, title : string = 'Alert', buttonName : string = 'OK') : Promise<any>{
|
static alert(
|
||||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
message,
|
||||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
title: string = 'Alert',
|
||||||
// knows that the correct return type is Promise, because there's no way
|
buttonName: string = 'OK'
|
||||||
// for it to know the return type from a decorator.
|
): Promise<any>{ return }
|
||||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
|
||||||
return new Promise<any>((res, rej) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays a customizable confirmation dialog box.
|
* Displays a customizable confirmation dialog box.
|
||||||
@ -62,14 +59,11 @@ export class Dialogs {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 4
|
errorIndex: 4
|
||||||
})
|
})
|
||||||
static confirm(message, title : string = 'Confirm', buttonLabels : Array<string> = ['OK', 'Cancel']) : Promise<number>{
|
static confirm(
|
||||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
message,
|
||||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
title: string = 'Confirm',
|
||||||
// knows that the correct return type is Promise, because there's no way
|
buttonLabels: Array<string> = ['OK', 'Cancel']
|
||||||
// for it to know the return type from a decorator.
|
): Promise<number>{ return }
|
||||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
|
||||||
return new Promise<number>((res, rej) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays a native dialog box that is more customizable than the browser's prompt function.
|
* Displays a native dialog box that is more customizable than the browser's prompt function.
|
||||||
@ -83,14 +77,12 @@ export class Dialogs {
|
|||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 5
|
errorIndex: 5
|
||||||
})
|
})
|
||||||
static prompt(message, title : string = 'Prompt', buttonLabels : Array<string> = ['OK', 'Cancel'], defaultText : string = '') : Promise<any>{
|
static prompt(
|
||||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
message?: string,
|
||||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
title: string = 'Prompt',
|
||||||
// knows that the correct return type is Promise, because there's no way
|
buttonLabels: Array<string> = ['OK', 'Cancel'],
|
||||||
// for it to know the return type from a decorator.
|
defaultText: string = ''
|
||||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
): Promise<any>{ return }
|
||||||
return new Promise<any>((res, rej) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -100,6 +92,6 @@ export class Dialogs {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static beep(times : number) : void {}
|
static beep(times: number): void {}
|
||||||
|
|
||||||
}
|
}
|
@ -102,14 +102,7 @@ export class Facebook {
|
|||||||
* @return Returns a Promise that resolves with a status object if login succeeds, and rejects if login fails.
|
* @return Returns a Promise that resolves with a status object if login succeeds, and rejects if login fails.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static login(permissions: string[]){
|
static login(permissions: string[]): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logout of Facebook.
|
* Logout of Facebook.
|
||||||
@ -118,14 +111,7 @@ export class Facebook {
|
|||||||
* @return Returns a Promise that resolves on a successful logout, and rejects if logout fails.
|
* @return Returns a Promise that resolves on a successful logout, and rejects if logout fails.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static logout(){
|
static logout(): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if a user is logged in to Facebook and has authenticated your app. There are three possible states for a user:
|
* Determine if a user is logged in to Facebook and has authenticated your app. There are three possible states for a user:
|
||||||
@ -154,14 +140,7 @@ export class Facebook {
|
|||||||
* @return Returns a Promise that resolves with a status, or rejects with an error
|
* @return Returns a Promise that resolves with a status, or rejects with an error
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getLoginStatus(){
|
static getLoginStatus(): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a Facebook access token for using Facebook services.
|
* Get a Facebook access token for using Facebook services.
|
||||||
@ -169,14 +148,7 @@ export class Facebook {
|
|||||||
* @return Returns a Promise that resolves with an access token, or rejects with an error
|
* @return Returns a Promise that resolves with an access token, or rejects with an error
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getAccessToken(){
|
static getAccessToken(): Promise<string> { return }
|
||||||
// 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<string>((res, rej) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show one of various Facebook dialogs. Example of options for a Share dialog:
|
* Show one of various Facebook dialogs. Example of options for a Share dialog:
|
||||||
@ -196,14 +168,7 @@ export class Facebook {
|
|||||||
* @return Returns a Promise that resolves with success data, or rejects with an error
|
* @return Returns a Promise that resolves with success data, or rejects with an error
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static showDialog(options: any){
|
static showDialog(options: any): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Make a call to Facebook Graph API. Can take additional permissions beyond those granted on login.
|
* Make a call to Facebook Graph API. Can take additional permissions beyond those granted on login.
|
||||||
@ -219,14 +184,7 @@ export class Facebook {
|
|||||||
* @return Returns a Promise that resolves with the result of the request, or rejects with an error
|
* @return Returns a Promise that resolves with the result of the request, or rejects with an error
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static api(requestPath: string, permissions: string[]){
|
static api(requestPath: string, permissions: string[]): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log an event. For more information see the Events section above.
|
* Log an event. For more information see the Events section above.
|
||||||
@ -237,14 +195,11 @@ export class Facebook {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static logEvent(name: string, params?: Object, valueToSum?: number){
|
static logEvent(
|
||||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
name: string,
|
||||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
params?: Object,
|
||||||
// knows that the correct return type is Promise, because there's no way
|
valueToSum?: number
|
||||||
// for it to know the return type from a decorator.
|
): Promise<any> { return }
|
||||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
|
||||||
return new Promise<any>((res, rej) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log a purchase. For more information see the Events section above.
|
* Log a purchase. For more information see the Events section above.
|
||||||
@ -254,14 +209,7 @@ export class Facebook {
|
|||||||
* @return Returns a Promise
|
* @return Returns a Promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static logPurchase(value: number, currency: string){
|
static logPurchase(value: number, currency: string): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Open App Invite dialog. Does not require login.
|
* Open App Invite dialog. Does not require login.
|
||||||
@ -282,12 +230,5 @@ export class Facebook {
|
|||||||
static appInvite(options: {
|
static appInvite(options: {
|
||||||
url: string,
|
url: string,
|
||||||
picture: string
|
picture: string
|
||||||
}){
|
}): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -22,60 +22,28 @@ export class Flashlight {
|
|||||||
* @returns {Promise<boolean>} Returns a promise that resolves with a boolean stating if the flash light is available.
|
* @returns {Promise<boolean>} Returns a promise that resolves with a boolean stating if the flash light is available.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static available() : Promise<boolean>{
|
static available(): Promise<boolean> { return }
|
||||||
// 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<boolean>((res,rej)=>{});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Switches the flashlight on
|
* Switches the flashlight on
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static switchOn() : Promise<boolean>{
|
static switchOn(): Promise<boolean> { return }
|
||||||
// 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<boolean>((res,rej)=>{});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Switches the flash light off
|
* Switches the flash light off
|
||||||
* @returns {Promise<boolean>}
|
* @returns {Promise<boolean>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static switchOff() : Promise<boolean>{
|
static switchOff(): Promise<boolean> { return }
|
||||||
// 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<boolean>((res,rej)=>{});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Toggles the flashlight
|
* Toggles the flashlight
|
||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static toggle() : Promise<any> {
|
static toggle(): Promise<any> { return }
|
||||||
// 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)=>{});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -85,9 +53,6 @@ export class Flashlight {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static isSwitchedOn() : boolean {
|
static isSwitchedOn(): boolean { return }
|
||||||
// DUMMY BOOLEAN, @Cordova decorator will replace value.
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
@ -128,14 +128,7 @@ export class Geolocation {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
static getCurrentPosition(options?: GeolocationOptions){
|
static getCurrentPosition(options?: GeolocationOptions): Promise<Geoposition> { return }
|
||||||
// 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<Geoposition>((res, rej) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Watch the current device's position. Clear the watch by unsubscribing from
|
* Watch the current device's position. Clear the watch by unsubscribing from
|
||||||
@ -158,12 +151,5 @@ export class Geolocation {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'clearWatch'
|
clearFunction: 'clearWatch'
|
||||||
})
|
})
|
||||||
static watchPosition(options?: GeolocationOptions){
|
static watchPosition(options?: GeolocationOptions): Observable<Geoposition> { return }
|
||||||
// This Observable 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 Observable, 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 Observable<Geoposition>(observer => {});
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
@ -50,12 +50,5 @@ export class ImagePicker {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse'
|
callbackOrder: 'reverse'
|
||||||
})
|
})
|
||||||
static getPictures(options: ImagePickerOptions) {
|
static getPictures(options: ImagePickerOptions): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
@ -80,13 +80,10 @@ export class LaunchNavigator {
|
|||||||
successIndex: 2,
|
successIndex: 2,
|
||||||
errorIndex: 3
|
errorIndex: 3
|
||||||
})
|
})
|
||||||
static navigate(destination : any, start : any, options? : launchNavigatorOptions) : Promise<any> {
|
static navigate(
|
||||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
destination: any,
|
||||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
start: any,
|
||||||
// knows that the correct return type is Promise, because there's no way
|
options?: launchNavigatorOptions
|
||||||
// for it to know the return type from a decorator.
|
): Promise<any> { return }
|
||||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
|
||||||
return new Promise<any>((res, rej) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -285,21 +285,13 @@ export class Push {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
static init(options: PushOptions){
|
static init(options: PushOptions): PushNotification { return }
|
||||||
return new PushNotification();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check whether the push notification permission has been granted.
|
* Check whether the push notification permission has been granted.
|
||||||
* @return {Promise} Returns a Promise that resolves with an object with one property: isEnabled, a boolean that indicates if permission has been granted.
|
* @return {Promise} Returns a Promise that resolves with an object with one property: isEnabled, a boolean that indicates if permission has been granted.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static hasPermission(){
|
static hasPermission(): Promise<{ isEnabled: boolean }> { return }
|
||||||
// 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<{ isEnabled: boolean }>((res, rej) => {});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -51,13 +51,10 @@ export class SMS {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static send(number : any, message : string, options? : smsOptions) : Promise<any> {
|
static send(
|
||||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
number: string | string[],
|
||||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
message: string,
|
||||||
// knows that the correct return type is Promise, because there's no way
|
options?: smsOptions
|
||||||
// for it to know the return type from a decorator.
|
): Promise<any> { return }
|
||||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
|
||||||
return new Promise<any>((res, rej) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,5 @@ export class StatusBar {
|
|||||||
* Whether the StatusBar is currently visible or not.
|
* Whether the StatusBar is currently visible or not.
|
||||||
*/
|
*/
|
||||||
@CordovaProperty
|
@CordovaProperty
|
||||||
static get isVisible() {
|
static get isVisible() { return window.StatusBar.isVisible; }
|
||||||
return window.StatusBar.isVisible;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -31,28 +31,18 @@ export class Toast {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'hide'
|
clearFunction: 'hide'
|
||||||
})
|
})
|
||||||
static show(message: string, duration: string, position: string){
|
static show(
|
||||||
// This Observable is replaced by one from the @Cordova decorator that wraps
|
message: string,
|
||||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
duration: string,
|
||||||
// knows that the correct return type is Observable, because there's no way
|
position: string
|
||||||
// for it to know the return type from a decorator.
|
): Observable<any> { return }
|
||||||
// See https://github.com/Microsoft/TypeScript/issues/4881
|
|
||||||
return new Observable<any>(observer => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manually hide any currently visible toast.
|
* Manually hide any currently visible toast.
|
||||||
* @return {Promise} Returns a Promise that resolves on success.
|
* @return {Promise} Returns a Promise that resolves on success.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static hide(){
|
static hide(): Promise<any>{ return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show a native toast with the given options.
|
* Show a native toast with the given options.
|
||||||
@ -69,14 +59,7 @@ export class Toast {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'hide'
|
clearFunction: 'hide'
|
||||||
})
|
})
|
||||||
static showWithOptions(options: ToastOptions){
|
static showWithOptions(options: ToastOptions): Observable<any> { return }
|
||||||
// This Observable 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 Observable, 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 Observable<any>(observer => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shorthand for `show(message, 'short', 'top')`.
|
* Shorthand for `show(message, 'short', 'top')`.
|
||||||
@ -86,14 +69,7 @@ export class Toast {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'hide'
|
clearFunction: 'hide'
|
||||||
})
|
})
|
||||||
static showShortTop(message: string){
|
static showShortTop(message: string): Observable<any> { return }
|
||||||
// This Observable 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 Observable, 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 Observable<any>(observer => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shorthand for `show(message, 'short', 'center')`.
|
* Shorthand for `show(message, 'short', 'center')`.
|
||||||
@ -103,14 +79,8 @@ export class Toast {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'hide'
|
clearFunction: 'hide'
|
||||||
})
|
})
|
||||||
static showShortCenter(message: string){
|
static showShortCenter(message: string): Observable<any> { return }
|
||||||
// This Observable 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 Observable, 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 Observable<any>(observer => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shorthand for `show(message, 'short', 'bottom')`.
|
* Shorthand for `show(message, 'short', 'bottom')`.
|
||||||
@ -120,14 +90,8 @@ export class Toast {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'hide'
|
clearFunction: 'hide'
|
||||||
})
|
})
|
||||||
static showShortBottom(message: string){
|
static showShortBottom(message: string): Observable<any> { return }
|
||||||
// This Observable 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 Observable, 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 Observable<any>(observer => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shorthand for `show(message, 'long', 'top')`.
|
* Shorthand for `show(message, 'long', 'top')`.
|
||||||
@ -137,14 +101,8 @@ export class Toast {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'hide'
|
clearFunction: 'hide'
|
||||||
})
|
})
|
||||||
static showLongTop(message: string){
|
static showLongTop(message: string): Observable<any> { return }
|
||||||
// This Observable 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 Observable, 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 Observable<any>(observer => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shorthand for `show(message, 'long', 'center')`.
|
* Shorthand for `show(message, 'long', 'center')`.
|
||||||
@ -154,14 +112,8 @@ export class Toast {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'hide'
|
clearFunction: 'hide'
|
||||||
})
|
})
|
||||||
static showLongCenter(message: string){
|
static showLongCenter(message: string): Observable<any> { return }
|
||||||
// This Observable 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 Observable, 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 Observable<any>(observer => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shorthand for `show(message, 'long', 'bottom')`.
|
* Shorthand for `show(message, 'long', 'bottom')`.
|
||||||
@ -171,12 +123,6 @@ export class Toast {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'hide'
|
clearFunction: 'hide'
|
||||||
})
|
})
|
||||||
static showLongBottom(message: string){
|
static showLongBottom(message: string): Observable<any> { return }
|
||||||
// This Observable 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 Observable, 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 Observable<any>(observer => {});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -34,14 +34,7 @@ export class TouchID {
|
|||||||
* @return {Promise} Returns a Promise that resolves if yes, rejects if no.
|
* @return {Promise} Returns a Promise that resolves if yes, rejects if no.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
isAvailable() {
|
isAvailable(): Promise<any>{ return }
|
||||||
// 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) => {});
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show TouchID dialog and wait for a fingerprint scan. If user taps 'Enter Password' button, brings up standard system passcode screen.
|
* Show TouchID dialog and wait for a fingerprint scan. If user taps 'Enter Password' button, brings up standard system passcode screen.
|
||||||
@ -50,14 +43,7 @@ export class TouchID {
|
|||||||
* @return {Promise} Returns a Promise the resolves if the fingerprint scan was successful, rejects with an error code (see above).
|
* @return {Promise} Returns a Promise the resolves if the fingerprint scan was successful, rejects with an error code (see above).
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static verifyFingerprint(message: string) {
|
static verifyFingerprint(message: string): Promise<any>{ return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show TouchID dialog and wait for a fingerprint scan. If user taps 'Enter Password' button, rejects with code '-3' (see above).
|
* Show TouchID dialog and wait for a fingerprint scan. If user taps 'Enter Password' button, rejects with code '-3' (see above).
|
||||||
@ -66,14 +52,7 @@ export class TouchID {
|
|||||||
* @return {Promise} Returns a Promise the resolves if the fingerprint scan was successful, rejects with an error code (see above).
|
* @return {Promise} Returns a Promise the resolves if the fingerprint scan was successful, rejects with an error code (see above).
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static verifyFingerprintWithCustomPasswordFallback(message: string) {
|
static verifyFingerprintWithCustomPasswordFallback(message: string): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show TouchID dialog with custom 'Enter Password' message and wait for a fingerprint scan. If user taps 'Enter Password' button, rejects with code '-3' (see above).
|
* Show TouchID dialog with custom 'Enter Password' message and wait for a fingerprint scan. If user taps 'Enter Password' button, rejects with code '-3' (see above).
|
||||||
@ -83,12 +62,5 @@ export class TouchID {
|
|||||||
* @return {Promise} Returns a Promise the resolves if the fingerprint scan was successful, rejects with an error code (see above).
|
* @return {Promise} Returns a Promise the resolves if the fingerprint scan was successful, rejects with an error code (see above).
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static verifyFingerprintWithCustomPasswordFallbackAndEnterPasswordLabel(message: string, enterPasswordLabel: string) {
|
static verifyFingerprintWithCustomPasswordFallbackAndEnterPasswordLabel(message: string, enterPasswordLabel: string): Promise<any> { return }
|
||||||
// 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) => {});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user