-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Description
TypeScript Version: 3.0.0-rc
Search Terms:
Code
src
├── client
│ ├── main.ts
│ └── tsconfig.json
└── shared
├── main.ts
└── tsconfig.json
// src/client/main.ts
import { foo } from '../shared/main';
console.log({ foo })// src/client/tsconfig.json
{
"compilerOptions": {
// Needed for project references.
"composite": true,
"declaration": true,
// Other options...
"outDir": "../../lib/client",
"strict": true, "module": "esnext", "moduleResolution": "node",
},
"references": [
{ "path": "../shared" }
]
}// src/shared/main.ts
export const foo = 1;// src/shared/tsconfig.json
{
"compilerOptions": {
// Needed for project references.
"composite": true,
"declaration": true,
"declarationMap": true,
// Other options...
"outDir": "../../lib/shared",
"strict": true, "module": "esnext", "moduleResolution": "node",
}
}- Run
tsc --build ./src/client/ - Configure VSCode TypeScript version to use workspace, and reload VSCode
Expected behavior:
"Go to definition" should work for foo identifier in src/client/main.ts.
Actual behavior:
"Go to definition" does not work for foo identifier in src/client/main.ts.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScript
