这是indexloc提供的服务,不要输入任何密码
Skip to content

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

@jnizet

Description

@jnizet
  • 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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions