chore(): cleanup return values

Addresses https://github.com/driftyco/ionic-native/issues/38.
This commit is contained in:
Tim Lancina
2016-03-10 15:48:20 -06:00
parent 78fdbcd42e
commit 998a58e036
21 changed files with 141 additions and 611 deletions
+13 -72
View File
@@ -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.
*/
@Cordova()
static login(permissions: 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 login(permissions: string[]): Promise<any> { return }
/**
* 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.
*/
@Cordova()
static logout(){
// 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 logout(): Promise<any> { return }
/**
* 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
*/
@Cordova()
static getLoginStatus(){
// 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 getLoginStatus(): Promise<any> { return }
/**
* 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
*/
@Cordova()
static getAccessToken(){
// 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) => {});
}
static getAccessToken(): Promise<string> { return }
/**
* 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
*/
@Cordova()
static showDialog(options: any){
// 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 showDialog(options: any): Promise<any> { return }
/**
* 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
*/
@Cordova()
static api(requestPath: string, permissions: 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 api(requestPath: string, permissions: string[]): Promise<any> { return }
/**
* Log an event. For more information see the Events section above.
@@ -237,14 +195,11 @@ export class Facebook {
* @return
*/
@Cordova()
static logEvent(name: string, params?: Object, valueToSum?: number){
// 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 logEvent(
name: string,
params?: Object,
valueToSum?: number
): Promise<any> { return }
/**
* Log a purchase. For more information see the Events section above.
@@ -254,14 +209,7 @@ export class Facebook {
* @return Returns a Promise
*/
@Cordova()
static logPurchase(value: number, currency: 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 logPurchase(value: number, currency: string): Promise<any> { return }
/**
* Open App Invite dialog. Does not require login.
@@ -282,12 +230,5 @@ export class Facebook {
static appInvite(options: {
url: string,
picture: 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 }
}