KEYCLOAK-10026: Add missing TypeScript definition for init options

This commit is contained in:
Anders Rønning 2019-04-10 19:27:02 +02:00 committed by Stan Silvert
parent 2736dd9d61
commit 3f7d32d1ae

View file

@ -34,6 +34,7 @@ declare namespace Keycloak {
type KeycloakResponseMode = 'query'|'fragment'; type KeycloakResponseMode = 'query'|'fragment';
type KeycloakResponseType = 'code'|'id_token token'|'code id_token token'; type KeycloakResponseType = 'code'|'id_token token'|'code id_token token';
type KeycloakFlow = 'standard'|'implicit'|'hybrid'; type KeycloakFlow = 'standard'|'implicit'|'hybrid';
type KeycloakPromiseType = 'native'
interface KeycloakInitOptions { interface KeycloakInitOptions {
/** /**
@ -109,6 +110,13 @@ declare namespace Keycloak {
* @default standard * @default standard
*/ */
flow?: KeycloakFlow; flow?: KeycloakFlow;
/**
* Set the promise type. If set to `'native'` all methods returning a promise
* will return a native JavaScript promise. If not set will return
* Keycloak specific promise objects.
*/
promiseType?: KeycloakPromiseType;
} }
interface KeycloakLoginOptions { interface KeycloakLoginOptions {