-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Allow overwriting types within projects #28922
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
Comments
You can always just fork the This isn't necessarily perfect, but it works today and gets you the flexibility you want. |
Of course it will work. My request is actually a design improvement and not a solution to incompatibility problem. To me your solution simply burden the end user without discussion |
hi @weswigham [proposal]
In my project i need to make sure to use I saw also one person posted about namespace overwrite (another proposal) thank you |
This issue has been marked as 'Question' and has seen no recent activity. It has been automatically closed for house-keeping purposes. If you're still waiting on a response, questions are usually better suited to stackoverflow. |
Search Terms
Suggestion
I would like to have a way to overwrite an existing type (d.ts) provided by a module within
node_module
folder.Use Cases
Recently we put some effort to update jest types within DefinitelyType project but the maintainers are against the changes cause it adds more constraints and their argument is not everyone wants to strongly type their tests.
This opens up for discussion what if some want to not copy the whole definition and just overwrite some? So it would be very useful to overwrite provided types within project.
Examples
The main type definition would be using
any
to ease the use of library for everyoneand we overwrite it within our project as following to benefit all the types:
Checklist
My suggestion meets these guidelines:
The text was updated successfully, but these errors were encountered: