Repository navigation
Implementing interface puts relative imports #34995
Copy link
Copy link
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issueVS Code PriorityCritical issues that VS Code needs fixed in the current TypeScript milestoneCritical issues that VS Code needs fixed in the current TypeScript milestone
Milestone
Description
TypeScript Version: 3.7.2
Code
git clone https://github.com/microsoft/vscode.gityarn- 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.');
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issueVS Code PriorityCritical issues that VS Code needs fixed in the current TypeScript milestoneCritical issues that VS Code needs fixed in the current TypeScript milestone
Activity
andrewbranch commentedon Nov 8, 2019
Needs the same fix as #32910 (#33915)
mjbvz commentedon Nov 13, 2019
See #35078 for a very simple repo.
As a side point, Benjamin Pasero (@bpasero)'s example also shows that the inline imports always use relative paths (regardless of what
typescript.preferences.importModuleSpecifieris set to)bpasero commentedon May 9, 2020
Andrew Branch (@andrewbranch) Matt Bierner (@mjbvz) I can still reproduce this in VSCode, please reopen. We seem to be using
3.9.1-rc.mjbvz commentedon May 11, 2020
Benjamin Pasero (@bpasero) Can you please share updated steps to reproduce this too
bpasero commentedon May 12, 2020
Matt Bierner (@mjbvz) Andrew Branch (@andrewbranch) I updated #34995 (comment) with the steps