Skip to content

Add Missing Import Quick Fix Inserts Import Before "Use Strict" Directive  #15515

@mjbvz

Description

@mjbvz

TypeScript Version: 2.3.2

Code

a.ts:

"use strict";
export class A {}

b.ts

"use strict";
export class B extends A {}

Trigger a quickfix on A in B extends A to add the missing import

Expected behavior:
Resulting code:

"use strict";
import { A } from "./a";
export class B extends A {}

Actual behavior:
Import is to the head of the file, before "use strict"

import { A } from "./a";
"use strict";
export class B extends A {}

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: LS: Quick FixesEditor-provided fixes, often called code actions.FixedA PR has been merged for this issueVS Code TrackedThere is a VS Code equivalent to this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions