Closed
Description
TypeScript Version: 3.8.0-dev.20191112
Search Terms:
- Implement interface
- quick fix
- code action
- add missing imports
Code
For a small project:
iface.ts
export interface IValue {
value: number;
}
export interface IFace {
do(value: IValue): void;
}
index.ts
import { IFace } from "./iface";
export class Foo implements IFace {}
- Run
implement interface
onFoo
Current Behavior:
The generated code is:
import { IFace } from "./iface";
export class Foo implements IFace {
do(value: import("./iface").IValue): void {
throw new Error("Method not implemented.");
}
}
Request
We would like an option to tell TypeScript to not use inline imports and instead always add normal imports at the top of the file.
import { IFace, IValue } from "./iface";
export class Foo implements IFace {
do(value: IValue): void {
throw new Error("Method not implemented.");
}
}
/cc @bpasero Since I know you were passionate about this issue