-
Notifications
You must be signed in to change notification settings - Fork 950
fix!(ai): convert TS enums exports in Firebase AI into const variables #9137
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
Conversation
🦋 Changeset detectedLatest commit: 8f555d1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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 |
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1This report is too large (81,741 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.Test Logs |
@@ -118,6 +126,6 @@ export interface SchemaInterface extends SchemaShared<SchemaInterface> { | |||
* @public | |||
*/ | |||
export interface ObjectSchemaInterface extends SchemaInterface { | |||
type: SchemaType.OBJECT; | |||
type: 'object'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we no longer use SchemaType.OBJECT
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, error is: "'SchemaType' only refers to a type, but is being used as a namespace here." It's not an enum anymore so the only actual type that exists now is the string union. The const is JS code and not referenceable by a TS type-only interface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG, thanks!
Following the AIP guidance here (internal link - excerpt below):
https://g3doc.corp.google.com/firebase/g3doc/aip/3270.md?cl=head#typescript-enums-and-const-enums
This could break some users depending on how they are consuming these enums so we will mark this as a breaking change and release with the breaking release.