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

Incorrect auth typing in 9.8.0: Cannot find name 'PhoneOrOauthTokenResponse #6246

Closed
jnizet opened this issue May 6, 2022 · 5 comments · Fixed by #6248
Closed

Incorrect auth typing in 9.8.0: Cannot find name 'PhoneOrOauthTokenResponse #6246

jnizet opened this issue May 6, 2022 · 5 comments · Fixed by #6248

Comments

@jnizet
Copy link

jnizet commented May 6, 2022

  • Operating System version: macOS
  • Browser version: NA
  • Firebase SDK version: 9.8.0
  • Firebase Product: auth

[REQUIRED] Describe the problem

The TypeScript typings of version 9.8.0 are incorrect. When compiling against them, I get the error

Error: node_modules/@firebase/auth/dist/auth-public.d.ts:3137:22 - error TS2304: Cannot find name 'PhoneOrOauthTokenResponse'.

3137     _tokenResponse?: PhoneOrOauthTokenResponse;
                          ~~~~~~~~~~~~~~~~~~~~~~~~~

Error: node_modules/@firebase/auth/dist/auth-public.d.ts:3429:11 - error TS2304: Cannot find name 'UserInternal'.

3429     user: UserInternal;
               ~~~~~~~~~~~~

And indeed, if we look into the referenced file, we find, at line 2440:

/* Excluded from this release type: PhoneOrOauthTokenResponse */

So the type PhoneOrOauthTokenResponse has been commented out, but it's used at line 3137:

declare interface TaggedWithTokenResponse {
    _tokenResponse?: PhoneOrOauthTokenResponse;
}

The same issue exists with UserInternal. At line3468, we have

/* Excluded from this release type: UserInternal */

but at line 3429, we have

declare interface UserCredentialInternal extends UserCredential, TaggedWithTokenResponse {
    user: UserInternal;
}
@hsubox76
Copy link
Contributor

hsubox76 commented May 6, 2022

Something about #6151 caused api-extractor to try to export TaggedWithTokenResponse and UserCredentialInternal as public types when it hadn't previously. Not sure why this change would have triggered this, but I am making a PR to tag these explicitly as internal.

@vandres
Copy link

vandres commented May 7, 2022

Will there be a quick patch, as it makes that release unusable?

@hsubox76
Copy link
Contributor

hsubox76 commented May 9, 2022

Merged, will try to get a release out today.

@hsubox76
Copy link
Contributor

hsubox76 commented May 9, 2022

Released in 9.8.1

@jnizet
Copy link
Author

jnizet commented May 9, 2022

Thanks @hsubox76

@firebase firebase locked and limited conversation to collaborators Jun 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@vandres @jnizet @hsubox76 @google-oss-bot and others