I'm currently facing a challenge in creating an instance of a class in TypeScript/Angular. Within my project, there is a specific scenario where I need to call a method from an exported function that is located within another class in TypeScript.
const myObject = new TokenService(MsalService);
Encountering the following error message has caused me to become stuck on this issue for an entire day. How can I go about resolving this error?
Argument of type 'typeof MsalService' is not assignable to parameter of type 'MsalService'. Type 'typeof MsalService' is missing the following properties from type 'MsalService': instance, location, redirectHash, logger, and 13 more.ts(2345) graphql.module.ts(59, 37): Did you mean to use 'new' with this expression?
https://i.sstatic.net/uzGBc.png
The actual class has a constructor