Repository navigation
enh(#988,#1031,#585): improve module augmentation - #1101
Open
phoenix-ru wants to merge 2 commits into
Open
phoenix-ru wants to merge 2 commits into
phoenix-ru wants to merge 2 commits into
Conversation
commit: |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Linked issue
Closes #988
Closes #1031
Closes #585
❓ Type of change
📚 Description
This PR improves the documentation around module augmentation for both providers. The documentation around it was also tested and weak/incorrect points were patched.
❗ Breaking change disclaimer
There is a small breaking change in this PR - the default value of
session.dataType: { id: 'string | number' }has been replaced by an empty object{}after researching the actual usages of this option. Most projects define their ownsession.dataType, and lots of them overwriteid. The ones which omitidordataTypeentirely most of the time do not rely onidbeing available. If they do, this will be a breaking change for them. The expected impact is incredibly low, however, so it does not warrant a major release.You are impacted if you have either of these configs:
To migrate, explicitly declare
idondataTypeif you actually rely on it:or use proper TypeScript module augmentation (recommended):
📝 Checklist