Skip to content
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

In defense of interface: Using declaration merging to disable bad parts #13

Open
danvk opened this issue Mar 1, 2022 · 4 comments
Open
Labels
💬 blog comments Comments on effectivetypescript.com (Utterances)

Comments

@danvk
Copy link
Owner

danvk commented Mar 1, 2022

In defense of interface: Using declaration merging to disable bad parts

https://effectivetypescript.com/2021/06/03/interface/

@danvk
Copy link
Owner Author

danvk commented Mar 1, 2022

Comment by Serhii on 2021-07-07 09:13:

Here I have overloaded BuiltIn CallableFunction

@danvk danvk added the 💬 blog comments Comments on effectivetypescript.com (Utterances) label Mar 1, 2022
Copy link

Declaration merging deserves all the hate it gets. I can’t declare a class named Plugin in one of my files because it conflicts with the DOM Plugin class? That’s user-antagonistic behavior. Local names in JS shadow global names, so it’s really annoying that TS behaves completely differently.

Copy link

It’s just leftover cruft from TypeScript's pre-ESM days that needs to be eradicated.

Copy link

Monkeypatching type definitions can be useful but there should be a way to explicitly declare overrides, instead of having to exploit an ill-conceived feature to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💬 blog comments Comments on effectivetypescript.com (Utterances)
Projects
None yet
Development

No branches or pull requests

2 participants