Here is the export I am working with:
import * as jwt from 'jsonwebtoken';
...
export type MyJsonWebToken = typeof jwt;
Next, when attempting to use it in my code:
export class AuthService {
constructor(
@Inject(constants.JWT) private readonly jsonWebToken: MyJsonWebToken,
// issue here ^
){}
An error is being generated, specifically related to MyJsonWebToken
:
ReferenceError: jwt_provider_1 is not defined
at Object.<anonymous> (D:\Learning\nest\project\server\modules\Auth\auth.service.ts:9:59)
at Module._compile (module.js:573:30)
at Module.m._compile (D:\Learning\nest\project\node_modules\ts-node\src\index.ts:392:23)
at Module._extensions..js (module.js:584:10)
at Object.require.extensions.(anonymous function) [as .ts] (D:\Learning\nest\project\node_modules\ts-node\src\index.ts:395:12)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)
at Module.require (module.js:517:17)
at require (internal/module.js:11:18)