fix: export Volume class directly rather than as a const#1099
Merged
G-Rath merged 1 commit intostreamich:masterfrom May 3, 2025
bradzacher:patch-1
Merged
fix: export Volume class directly rather than as a const#1099G-Rath merged 1 commit intostreamich:masterfrom bradzacher:patch-1
Volume class directly rather than as a const#1099G-Rath merged 1 commit intostreamich:masterfrom
bradzacher:patch-1
Conversation
Volume as a const from index.tsVolume class directly rather than as a const
G-Rath
approved these changes
May 3, 2025
github-actions Bot
pushed a commit
that referenced
this pull request
May 3, 2025
## [4.17.1](v4.17.0...v4.17.1) (2025-05-03) ### Bug Fixes * export `Volume` class directly rather than as a `const` ([#1099](#1099)) ([9c99798](9c99798))
Contributor
|
🎉 This PR is included in version 4.17.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
This is a little fix that allows the code to work better with TS.
Currently
Volumeis re-exported as aconstthat aliases the class declaration.This makes it very hard to use the class -- for example the following idiomatic TS code is now invalid:
If we instead directly export
Volumethen TS correctly sees the re-exported type as a class declaration and everything works correctly.Fixes #976