Closed
Description
Adapted from this issue filed in the developer community.
Bug Report
🔎 Search Terms
- auto-imports
- import quick fix
🕗 Version & Regression Information
Not sure if this ever worked TBH.
💻 Code
- Create a TypeScript file (let's call it
file1.ts
) with the following content:
export const x = 0;
- Create a second file
file2.ts
with the following:
// A header
/// <reference lib="es2017.string" />
const y = x + 1;
- Request quick fixes for the "Cannot find name 'x'" error in
file2.ts
and select "Add import from './file1.ts'".
🙁 Actual behavior
The auto-import will modify file2.ts
to, which makes the triple-slash directive lose its meaning:
// A header
import { x } from "./file1";
/// <reference lib="es2017.string" />
const y = x + 1;
🙂 Expected behavior
The server adds the import under triple-slash directives.