Description I am trying to use jwt-decode in a typescript project i.e. Stencil Project & it is throwing following error:
This expression is not callable.Type '{ default: (token: string, options?: Options) => TTokenDto; }' has no call signatures.
import * as jwt_decode from 'jwt-decode';
.
.
.
let token = "........";
let decoded = jwt_decode(token);
Reproduction
- install jwt-decode in any typescript project npm install --save @types/jwt-decode npm install --save jwt-decode import it in your code & use import * as jwt_decode from 'jwt-decode'; . . . let token = "........"; let decoded = jwt_decode(token);
- build project
- Version of this library used: ^2.2.0 Version of the platform or
- framework used, if applicable: stencil - ^1.3.3 , typescript - 3.7.2
import jwt_decode from 'jwt-decode';
? – Libradalibrarian