-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
By DesignDeprecated - use "Working as Intended" or "Design Limitation" insteadDeprecated - use "Working as Intended" or "Design Limitation" instead
Description
Consider a.d.ts (which compiles fine in isolation) without any error:
declare module "foo" {
interface Foo {
a: number;
}
var _:Foo;
export = _;
}And b.d.ts that plans to add stuff to module foo's Foo interface:
/// <reference path="./a"/>
declare module "foo" {
interface Foo {
b: number;
}
}With this we have two errors:
a.d.tsgets an error onexport ="An export assignment cannot be used in a module with other exported elements.b.d.tsdoesn't actually manage to add to theinterface Fooas demonstrated by a test filetest.ts:
/// <reference path="./a"/>
/// <reference path="./b"/>
import foo = require("foo");
foo.b = 123; // ERROR: Property b to not exist on type FooDiscovered in DefinitelyTyped : DefinitelyTyped/DefinitelyTyped#4101 /cc @vvakame
Metadata
Metadata
Assignees
Labels
By DesignDeprecated - use "Working as Intended" or "Design Limitation" insteadDeprecated - use "Working as Intended" or "Design Limitation" instead