-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
Why the split declarations in lib.d.ts? #9154
Comments
The reason is rather historic. back in 0.8.* time classes and interfaces did not merge, and we wanted these classes to be extensible. The other part that makes blocks this conversion across the board is call signatures. there is no way now to define a call signature on a class. this is tracked by #183. As @plantain-00 noted; the result of the split should not be of any much consequence. moving to classes, would allow extending the static side, which is not allowed now. not sure that this is a common scenario however.
They can. I do agree it makes the declaration file cleaner and easier to read. this request is tracked by #574 |
Why are the declarations in
lib.d.ts
split into two?Why isn't this declared as a class?
These split declarations are seen as two declarations by VS Code, which doesn't work very well, e.g. doesn't show you the interface members in the pop-up:
Can't you merge these?
The text was updated successfully, but these errors were encountered: