I also faced with the similar situation.
I could resolve by using import type
.
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html
More Related Contents:
- Is there a `valueof` similar to `keyof` in TypeScript?
- How do I dynamically assign properties to an object in TypeScript?
- What is “not assignable to parameter of type never” error in TypeScript?
- Is it possible to restrict TypeScript object to contain only properties defined by its class?
- Is there a way to check for both `null` and `undefined`?
- Expected 3 type arguments but got 1 but it should infer 2 types
- Import class in definition file (*d.ts)
- Extending component decorator with base class decorator
- TypeScript union of string and string literals
- Are strongly-typed functions as parameters possible in TypeScript?
- What does the `is` keyword do in typescript?
- How to avoid imports with very long relative paths in Angular 2?
- TypeScript – use correct version of setTimeout (node vs window)
- Is there a way to “extract” the type of TypeScript interface property?
- Enforce that an array is exhaustive over a union type
- Using latest JavaScript features in TypeScript, such as ES2018
- TypeScript: Why can’t I assign a valid field of an object with type { a: “a”, b: “b” }
- TypeScript keyof returning specific type
- Generating typescript declaration files from javascript
- “An index signature parameter type cannot be a union type.” – what should I use instead?
- Typescript and spread operator?
- Detailed differences between type annotation `variable: type` and type assertion `expression as type` in TypeScript
- Generic and typeof T in the parameters
- Angular 2 loader on each http request
- Typescript: type narrowing not working for `in` when key is stored in a variable
- Run factory function on import in TypeScript?
- How do I decide whether @types/* goes into `dependencies` or `devDependencies`?
- Self-referencing return type for static methods in inheriting classes
- How to define an interface for objects with dynamic keys?
- Types from both keys and values of object in Typescript