Skip to content

Implementing interface puts relative imports #34995

@bpasero

Description

@bpasero

TypeScript Version: 3.7.2

Code

  • git clone https://github.com/microsoft/vscode.git
  • yarn
  • open VSCode on anythingQuickAccess.ts
  • type in the top:
class FooHandler implements IEditorGroup {

}
  • fix the error by letting it implement the interface

Expected behavior:
Code that gets generated does not use inline imports.

Actual behavior:
Code that gets generated adds inline imports:

class FooHandler implements IEditorGroup {
	onDidGroupChange: Event<IGroupChangeEvent>;
	onWillDispose: Event<void>;
	id: number;
	index: number;
	label: string;
	ariaLabel: string;
	activeEditorPane: import("../../../common/editor").IVisibleEditorPane | undefined;
	activeEditor: IEditorInput | null;
	previewEditor: IEditorInput | null;
	count: number;
	stickyCount: number;
	editors: readonly IEditorInput[];
	getEditors(order: EditorsOrder, options?: { excludeSticky?: boolean | undefined; } | undefined): readonly IEditorInput[] {
		throw new Error('Method not implemented.');
	}
	getEditorByIndex(index: number): IEditorInput | undefined {
		throw new Error('Method not implemented.');
	}
	getIndexOfEditor(editor: IEditorInput): number {
		throw new Error('Method not implemented.');
	}
	openEditor(editor: IEditorInput, options?: import("../../../../platform/editor/common/editor").IEditorOptions | ITextEditorOptions | undefined): Promise<import("../../../common/editor").IEditorPane | null> {
		throw new Error('Method not implemented.');
	}
	openEditors(editors: import("../../../common/editor").IEditorInputWithOptions[]): Promise<import("../../../common/editor").IEditorPane | null> {
		throw new Error('Method not implemented.');
	}
	isOpened(editor: IEditorInput): boolean {
		throw new Error('Method not implemented.');
	}
	isPinned(editor: IEditorInput): boolean {
		throw new Error('Method not implemented.');
	}
	isSticky(editorOrIndex: number | IEditorInput): boolean {
		throw new Error('Method not implemented.');
	}
	isActive(editor: IEditorInput): boolean {
		throw new Error('Method not implemented.');
	}
	moveEditor(editor: IEditorInput, target: IEditorGroup, options?: import("../../../services/editor/common/editorGroupsService").IMoveEditorOptions | undefined): void {
		throw new Error('Method not implemented.');
	}
	copyEditor(editor: IEditorInput, target: IEditorGroup, options?: import("../../../services/editor/common/editorGroupsService").ICopyEditorOptions | undefined): void {
		throw new Error('Method not implemented.');
	}
	closeEditor(editor?: IEditorInput | undefined, options?: import("../../../services/editor/common/editorGroupsService").ICloseEditorOptions | undefined): Promise<void> {
		throw new Error('Method not implemented.');
	}
	closeEditors(editors: IEditorInput[] | import("../../../services/editor/common/editorGroupsService").ICloseEditorsFilter, options?: import("../../../services/editor/common/editorGroupsService").ICloseEditorOptions | undefined): Promise<void> {
		throw new Error('Method not implemented.');
	}
	closeAllEditors(options?: import("../../../services/editor/common/editorGroupsService").ICloseAllEditorsOptions | undefined): Promise<void> {
		throw new Error('Method not implemented.');
	}
	replaceEditors(editors: import("../../../services/editor/common/editorGroupsService").IEditorReplacement[]): Promise<void> {
		throw new Error('Method not implemented.');
	}
	pinEditor(editor?: IEditorInput | undefined): void {
		throw new Error('Method not implemented.');
	}
	stickEditor(editor?: IEditorInput | undefined): void {
		throw new Error('Method not implemented.');
	}
	unstickEditor(editor?: IEditorInput | undefined): void {
		throw new Error('Method not implemented.');
	}
	focus(): void {
		throw new Error('Method not implemented.');
	}
	invokeWithinContext<T>(fn: (accessor: import("../../../../platform/instantiation/common/instantiation").ServicesAccessor) => T): T {
		throw new Error('Method not implemented.');
	}

}

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issueVS Code PriorityCritical issues that VS Code needs fixed in the current TypeScript milestone

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions