Skip to content
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 FirebaseServerApp Typescript exactOptionalPropertyTypes error #8341

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

DellaBitta
Copy link
Contributor

@DellaBitta DellaBitta commented Jun 27, 2024

Discussion

This change fixes a TypeScript compilation error.

The FirebaseServerAppSettings.name field inherited from FirebaseAppSettings but the type was redefined from string to undefined. This redefinition would cause a TypeScript compliation error if exactOptionalPropertyTypes was set true in packages/app/tsconfig.json.

This change now uses omit< , > to strip the name field from the FirebaseServerAppSettings declaration, where FirebaseAppSettings is extended.

Fixes #8336

Testing

  • Local build with the TypeScript exactOptionalPropertyTypes setting defined as true.
  • CI

Copy link

changeset-bot bot commented Jun 27, 2024

🦋 Changeset detected

Latest commit: 62a1cce

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
firebase Minor
@firebase/app Minor
@firebase/app-compat Patch

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jun 27, 2024

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jun 27, 2024

Copy link
Contributor

github-actions bot commented Jun 28, 2024

Changeset File Check ✅

  • No modified packages are missing from the changeset file.
  • No changeset formatting errors detected.

@DellaBitta DellaBitta marked this pull request as ready for review June 28, 2024 19:54
@DellaBitta DellaBitta requested review from a team as code owners June 28, 2024 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compilation Error with Typescript when enabling "exactOptionalPropertyTypes"
3 participants