-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Open
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Module ResolutionHow to turn an import specifier into a .d.ts, .ts, or .js file on diskHow to turn an import specifier into a .d.ts, .ts, or .js file on disk
Milestone
Description
In a directory named test:
// @Filename: tsconfig.json
{
"compilerOptions": {
"baseUrl": "../",
"typeRoots": [ "../" ],
"types": [],
"moduleResolution": "node",
"module": "commonjs"
},
"files": [
"welove.ts",
]
}
// @Filename: ex.d.ts
interface F {
(): void
}
// @Filename: welove.ts
/// <reference types="test/ex" />
declare var f: F
f()Expected: No errors; reference to F is fine in welove.ts.
Actual: "Cannot find type definition file for 'test/ex'.
Related things that work: "../test/ex", "./ex".
Also, import { A } from "test/foo" works -- imports use baseUrl/typeRoots correctly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Module ResolutionHow to turn an import specifier into a .d.ts, .ts, or .js file on diskHow to turn an import specifier into a .d.ts, .ts, or .js file on disk