-
Notifications
You must be signed in to change notification settings - Fork 920
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Compilation Error with Typescript when enabling "exactOptionalPropertyTypes" #8336
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Hi @ansf, thanks for reaching out to us. I was able to reproduce the error using your code. I'll communicate this with our engineers and bring someone here that can provide more context about it. I’ll update this thread if I have any information to share. |
This fix should go out in our next release! |
Merged
tom-andersen
pushed a commit
that referenced
this issue
Jul 24, 2024
) 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
# for free
to subscribe to this conversation on GitHub.
Already have an account?
#.
Operating System
macOS 14
Browser Version
Chrome 126
Firebase SDK Version
10.12.2
Firebase SDK Product:
Analytics
Describe your project's tooling
typescript project, with "exactOptionalPropertyTypes" enabled in tsconfig.json.
Describe the problem
The project does not compile and gives the following error:
With
exactOptionalPropertyTypes
the both declarations ofname
are not compatible (see https://www.typescriptlang.org/tsconfig/#exactOptionalPropertyTypes).This is actually a duplicate of #8227, but I was unable to comment on the original issue and wanted to provide a minimal reproducible example (see below)
Steps and code to reproduce issue
npm i
npm run compile
The text was updated successfully, but these errors were encountered: