-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do we need to use "declare" for type aliased in d.ts files? #1940
Comments
|
How does this affect #2994? |
My understanding is that |
Yui's interpretation is correct. Since we already shipped type aliases this way, people have had to write Having made that decision, it's only logical to allow |
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: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.The text was updated successfully, but these errors were encountered: