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

[Error] Firebase 5.0.0: Generic type 'Observer<T>' requires 1 type argument(s). #787

Closed
paulstelzer opened this issue May 8, 2018 · 5 comments · Fixed by #788
Closed

Comments

@paulstelzer
Copy link
Contributor

Issue: Generic type 'Observer' requires 1 type argument(s).

Observer types in Firebase 5.0.0 not fixed on all positions. In commit #770 the interface Observer is now "export interface Observer {...}", but in "/packages/auth-types/index.d.ts" at line 271 and 276 it's still the old one. The same at "/packages/storage-types/index.d.ts" line 80.

Environment

  • Operating System version: Windows 10
  • Firebase SDK version: 5.0.0
@google-oss-bot
Copy link
Contributor

Hey there! I couldn't figure out what this issue is about, so I've labeled it for a human to triage. Hang tight.

@google-oss-bot
Copy link
Contributor

Hmmm this issue does not seem to follow the issue template. Make sure you provide all the required information.

@nayfin
Copy link

nayfin commented May 21, 2018

I'm seeing this too. Using "angularfire2": "5.0.0-rc.8.", "firebase": "4.12.1", "@angular/core": "6.0.2". I started getting the following after upgraging to Angular 6.

ERROR in node_modules/@firebase/auth-types/index.d.ts(255,21): error TS2314: Generic type 'Observer<T>' requires 1 type argument(s).
node_modules/@firebase/auth-types/index.d.ts(260,21): error TS2314: Generic type 'Observer<T>'
requires 1 type argument(s).
node_modules/@firebase/messaging-types/index.d.ts(25,38): error TS2314: Generic type 'Observer<T>' requires 1 type argument(s).
node_modules/@firebase/messaging-types/index.d.ts(30,38): error TS2314: Generic type 'Observer<T>' requires 1 type argument(s).
node_modules/@firebase/storage-types/index.d.ts(77,22): error TS2314: Generic type 'Observer<T>' requires 1 type argument(s).

running npm install --save firebase@next gives me new errors but they are ones I can control.

@paulstelzer
Copy link
Contributor Author

@nayfin use the latest versions of angularfire2 and firebase. then everything should work again

@sreekanth-karini
Copy link

Update typescript, npm install typescript@2.3 --save will fix the error.

@firebase firebase locked and limited conversation to collaborators Oct 20, 2019
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.

4 participants