Skip to content

App Check typing errors (incorrect implementations of interface) #466

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

Closed
Temez1 opened this issue Oct 1, 2021 · 1 comment
Closed

App Check typing errors (incorrect implementations of interface) #466

Temez1 opened this issue Oct 1, 2021 · 1 comment

Comments

@Temez1
Copy link

Temez1 commented Oct 1, 2021

This is a copy of the issue in firebase/firebase-js-sdk#5569

to get your input to the discussion, see the question. I don't know if reactfire has something to do with this.

Environment

  • Firebase SDK version: 9.1.1
  • Reactfire version: 4.2.0

Problem

I'm trying to compile my project & it throws 2 errors

node_modules/@firebase/app-check/dist/app-check-public.d.ts:87:22 - error TS2420: Class 'CustomProvider' incorrectly implements interface 'AppCheckProvider'.
  Type 'CustomProvider' is missing the following properties from type 'AppCheckProvider': getToken, initialize

node_modules/@firebase/app-check/dist/app-check-public.d.ts:171:22 - error TS2420: Class 'ReCaptchaV3Provider' incorrectly implements interface 'AppCheckProvider'.
  Type 'ReCaptchaV3Provider' is missing the following properties from type 'AppCheckProvider': getToken, initialize

The source code has the following comments, but the compiler doesn't really care about those.

    /* Excluded from this release type: getToken */
    /* Excluded from this release type: initialize */
    /* Excluded from this release type: isEqual */

Steps to reproduce:

I started using firebase with Reactfire. I'm using just auth. I'm not using App Check.

Relevant Code:

TS config

{
  "compilerOptions": {
    "target": "ESNext",
    "useDefineForClassFields": true,
    "lib": ["DOM", "DOM.Iterable", "ESNext"],
    "allowJs": false,
    "skipLibCheck": false,
    "esModuleInterop": false,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "module": "ESNext",
    "moduleResolution": "Node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "jsx": "react-jsx",
    "types": ["vite/client"]
  },
  "include": ["./src"]
}
@Temez1 Temez1 closed this as completed Oct 5, 2021
@jhuleatt
Copy link
Collaborator

jhuleatt commented Oct 5, 2021

A fix for the typing problems has been merged, firebase/firebase-js-sdk#5569 and will be out in the next JS SDK release.

@FirebaseExtended FirebaseExtended locked and limited conversation to collaborators Nov 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants