-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
fix(types): Allow augmentation on model interfaces #11882
Conversation
Written export instead of star export for Model declarations to allow module augmentation
Codecov Report
@@ Coverage Diff @@
## v5 #11882 +/- ##
==========================================
- Coverage 96.27% 95.87% -0.41%
==========================================
Files 94 91 -3
Lines 9187 8984 -203
==========================================
- Hits 8845 8613 -232
- Misses 342 371 +29
Continue to review full report at Codecov.
|
Btw I've took all the exports from
|
Also possible current workaround - you can override types like this:
|
Hello! I see you are a first-time contributor, thank you for taking the time to help Sequelize! I hope to see more PRs from you in the future! Let's wait for @SimonSchick :) |
They can already be augmented as is but I don't see harm in exporting them from root regardless. |
🎉 This PR is included in version 5.21.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Written export instead of star export for Model declarations to allow module augmentation
Pull Request check-list
Please make sure to review and check all of these items:
npm run test
ornpm run test-DIALECT
pass with this change (including linting)?Description of change
Currently extending any Model interface is ignored, due to specific Typescript behaviour
This PR enables full usage of augmentation on Model interfaces like this:
Example demo repository is here