codediodeio / angular-firestarter

🍱 :fire: Angular + Firebase Progressive Web App Starter
https://firestarter.fireship.io/
959 stars 438 forks source link

Type 'Observable<User> | Observable<null>' is not assignable to type 'ObservableInput<User | null>'. #50

Closed esaysimyan closed 3 years ago

esaysimyan commented 6 years ago

On updating the project, I've run into this problem now. New to Angular .. so please help.

ERROR in src/app/core/auth.service.ts(32,9): error TS2345: Argument of type '(user: User | null) => Observable | Observable' is not assignable to parameter of type '(value: User | null, index: number) => ObservableInput<User | null>'. Type 'Observable | Observable' is not assignable to type 'ObservableInput<User | null>'. Type 'Observable' is not assignable to type 'ObservableInput<User | null>'. Type 'Observable' is not assignable to type 'ArrayLike<User | null>'. Property 'length' is missing in type 'Observable'.

src/app/uploads/shared/upload.service.ts(41,7): error TS2345: Argument of type '(snapshot: UploadTaskSnapshot) => void' is not assignable to parameter of type 'Observer<any, any> | ((a: Object) => any) | null | undefined'. Type '(snapshot: UploadTaskSnapshot) => void' is not assignable to type '(a: Object) => any'. Types of parameters 'snapshot' and 'a' are incompatible. Type 'Object' is not assignable to type 'UploadTaskSnapshot'. The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead? Property 'bytesTransferred' is missing in type 'Object'. src/app/uploads/shared/upload.service.ts(46,8): error TS7006: Parameter 'error' implicitly has an 'any' type.

javierfelix commented 5 years ago

i have the same error

javierfelix commented 5 years ago

did you fix it?

atheekalm commented 3 years ago

are you using --strictNullChecks ?