π Search Terms
ambient module, import
π Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about Common "Bugs" That Aren't Bugs
β― Playground Link
No response
π» Code
// local.ts
export interface Foo {
name: string
}
// ambient.d.ts
declare module "foo" {
import type { Foo } from "./local.ts";
export type { Foo };
const foo: Foo;
export default foo;
}
// foo.ts
import foo from "foo";
foo.name
π Actual behavior
foo.name is of type any
π Expected behavior
foo.name is of type string
Additional information about the issue
If I add export {}; to ambient.d.ts then it works, but I'm not trying to augment foo's type, it feels wrong.