Closed
Description
I read that declare
is required for all top level non-interface elements (i.e. module
, class
, var
) in a declaration .d.ts file.
But do we need it for type aliases too?
Right now this code in tests.d.ts
file gives error:
interface ITest {
foo: string;
bar: string;
}
type IMyAlias = ITest;
A 'declare' modifier is required for a top level declaration in a .d.ts file.
For me type aliases are similar to interfaces in this case and should not require declare
keyword.