TypeScript Version: (No version check command supplied)
Search Terms:
reference unused import
Code
// @ ./common/index.ts
export const foo = "bar";
export const baz = "qux";
// @ ./project/tsconfig.json
{
"compilerOptions": {
"composite": true,
"baseUrl": ".",
"paths": {
"common": ["../common/"]
},
"esModuleInterop": true
}
}
// @ ./project/src/tscofig.json.ts
{
"references": [
{ "path": "../" }
],
"compilerOptions": {
"rootDir": ".",
"outDir": "../dist",
"composite": true,
},
}
// @ ./project/src/world.ts
export const hello = "world";
// @ ./project/src/index.ts
// baz and hello should be unused imports
import { foo } from "common";
import { baz } from "common";
import { hello } from "./world"
console.log(foo);
// this function doesn't exist
thisShouldBeBroken();
Expected behavior:
Missing/unused imports feature should be recognized whether or not "references" is used in tsconfig.
Actual behavior:
Missing/unused imports feature only works without "references" set
Features broken:

Remove "references"

Features work again:
