-
Notifications
You must be signed in to change notification settings - Fork 924
Fix Data Connect Types #8898
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 Data Connect Types #8898
Conversation
🦋 Changeset detectedLatest commit: 3339ff3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Vertex AI Mock Responses Check
|
…se/firebase-js-sdk into mtewani/fix-private-error
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1Affected Products
Test Logs |
DataConnectOperationError
extendsDataConnectError
, both of which have tags@hideconstructor
. This means that in public builds, our output marks the constructors asprivate
. However, this causes an error to be thrown:cannot extend private constructor
, becauseDataConnectOperationError
extendsDataConnectError
, which has a private constructor. The reason why this wasn't caught during integration tests is because to integration tests, the constructors aren't private, but for public builds (that are used by external devs), the constructors are private. So the only way we could've caught this would've been to use the published version (or packaged version) of the SDK.TL;DR: Fix error where if we exported
DataConnectError
, then when using the types, the user would get acannot extend private constructor
due to the fact thatDataConnectOperationError
would extendDataConnectError
.The fix for this is to remove the
@hideconstructor
annotation. The right fix would have been to not exportDataConnectError
at all, but if we do that, it would result in a breaking change for those who useDataConnectError
. (Though, the argument can be made that no one is even able to use that type because the types are broken).