mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
initial cordova-plugin-ms-adal.d.ts + fixed TS7010
This commit is contained in:
@@ -15,7 +15,7 @@ function test_cordova_plugin_ms_adal() {
|
||||
|
||||
context.tokenCache.readItems().then((cacheItems) => {
|
||||
if (cacheItems.length >= 1) {
|
||||
var testUserId;
|
||||
var testUserId: string;
|
||||
testUserId = cacheItems[0].userInfo.userId;
|
||||
|
||||
context.acquireTokenSilentAsync(testConfiguration.resourceUrl, testConfiguration.clientId, testUserId).then((authResult) => {
|
||||
|
||||
+4
-4
@@ -35,11 +35,11 @@ declare namespace Microsoft {
|
||||
}
|
||||
|
||||
interface IPromise {
|
||||
then(doneCallBack: () => void, failCallBack?: (message: string) => void);
|
||||
then(doneCallBack: () => any, failCallBack?: (message: string) => any):any;
|
||||
}
|
||||
|
||||
interface IPromiseTokenCacheItems {
|
||||
then(doneCallBack: (tokenCacheItems: ITokenCacheItem[]) => void, failCallBack?: (message: string) => void);
|
||||
then(doneCallBack: (tokenCacheItems: ITokenCacheItem[]) => any, failCallBack?: (message: string) => any):any;
|
||||
}
|
||||
|
||||
class TokenCache implements ITokenCache {
|
||||
@@ -101,7 +101,7 @@ declare namespace Microsoft {
|
||||
}
|
||||
|
||||
interface IPromiseAuthenticationResult {
|
||||
then(doneCallBack: (context: IAuthenticationResult) => void, failCallBack?: (message: string) => void);
|
||||
then(doneCallBack: (context: IAuthenticationResult) => any, failCallBack?: (message: string) => any):any;
|
||||
}
|
||||
|
||||
interface IAuthenticationContext {
|
||||
@@ -142,7 +142,7 @@ declare namespace Microsoft {
|
||||
}
|
||||
|
||||
interface IPromiseAuthenticationContext {
|
||||
then(doneCallBack: (context: IAuthenticationContext) => void, failCallBack?: (message: string) => void);
|
||||
then(doneCallBack: (context: IAuthenticationContext) => any, failCallBack?: (message: string) => any):any;
|
||||
}
|
||||
|
||||
class AuthenticationContext implements IAuthenticationContext {
|
||||
|
||||
Reference in New Issue
Block a user