I'm using Keycloak auth mechanism for my angular/node/typescript application .I could not find a definitelyTyped d.ts file for Keycloak.js
Is there a typescript equivalent/work in progress for this JBOSS Keycloak.js adapter or do I have to write one ? any inputs/pointers would be much appreciated
There is an official type definition at:
https://github.com/keycloak/keycloak/blob/master/adapters/oidc/js/src/main/resources/keycloak.d.ts
and here
https://www.npmjs.com/package/@types/keycloak-js
https://www.npmjs.com/package/keycloak-js
From @types/keycloak-js:
keycloak-js provides its own type definitions, so you don't need @types/keycloak-js installed!
A simple one keycloak.d.ts
can be written with the contents:
declare var keycloak:any;
declare module "keycloak" {
export = keycloak;
}
More : https://basarat.gitbooks.io/typescript/content/docs/types/migrating.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With