Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error in configuration of firebase in angular

Tags:

firebase

This is the error which is coming when I hit enter on writing ng serve -o:

node_modules/@angular/fire/compat/proxy.d.ts:7:49 - error TS2344: Type 'T[K]' does not satisfy the constraint '(...args: any) => any'.
  Type 'T[FunctionPropertyNames<T>]' is not assignable to type '(...args: any) => any'.
    Type 'T[T[keyof T] extends Function ? keyof T : never]' is not assignable to type '(...args: any) => any'.
      Type 'T[keyof T]' is not assignable to type '(...args: any) => any'.
        Type 'T[string] | T[number] | T[symbol]' is not assignable to type '(...args: any) => any'.
          Type 'T[string]' is not assignable to type '(...args: any) => any'.

7     [K in FunctionPropertyNames<T>]: ReturnType<T[K]> extends Promise<any> ? K : never;
                                                  ~~~~


Error: node_modules/@angular/fire/compat/proxy.d.ts:10:49 - error TS2344: Type 'T[K]' does not satisfy the constraint '(...args: any) => any'.
  Type 'T[FunctionPropertyNames<T>]' is not assignable to type '(...args: any) => any'.
    Type 'T[T[keyof T] extends Function ? keyof T : never]' is not assignable to type '(...args: any) => any'.
      Type 'T[keyof T]' is not assignable to type '(...args: any) => any'.
        Type 'T[string] | T[number] | T[symbol]' is not assignable to type '(...args: any) => any'.
          Type 'T[string]' is not assignable to type '(...args: any) => any'.

10     [K in FunctionPropertyNames<T>]: ReturnType<T[K]> extends Promise<any> ? never : K;
                                                   ~~~~


Error: node_modules/@angular/fire/compat/proxy.d.ts:18:78 - error TS2344: Type 'T[K]' does not satisfy the constraint '(...args: any) => any'.
  Type 'T[NonPromiseReturningFunctionPropertyNames<T>]' is not assignable to type '(...args: any) => any'.
    Type 'T[ReturnType<T[FunctionPropertyNames<T>]> extends Promise<any> ? never : FunctionPropertyNames<T>]' is not assignable to type '(...args: any) => any'.
      Type 'T[FunctionPropertyNames<T>]' is not assignable to type '(...args: any) => any'.
        Type 'T[T[keyof T] extends Function ? keyof T : never]' is not assignable to type '(...args: any) => any'.
          Type 'T[keyof T]' is not assignable to type '(...args: any) => any'.
            Type 'T[string] | T[number] | T[symbol]' is not assignable to type '(...args: any) => any'.
              Type 'T[string]' is not assignable to type '(...args: any) => any'.

18     [K in NonPromiseReturningFunctionPropertyNames<T>]: (...args: Parameters<T[K]>) => Promise<ReturnType<T[K]>>;
                                                                                ~~~~


Error: node_modules/@angular/fire/compat/proxy.d.ts:18:107 - error TS2344: Type 'T[K]' does not satisfy the constraint '(...args: any) => any'.
  Type 'T[NonPromiseReturningFunctionPropertyNames<T>]' is not assignable to type '(...args: any) => any'.
    Type 'T[ReturnType<T[FunctionPropertyNames<T>]> extends Promise<any> ? never : FunctionPropertyNames<T>]' is not assignable to type '(...args: any) => any'.
      Type 'T[FunctionPropertyNames<T>]' is not assignable to type '(...args: any) => any'.
        Type 'T[T[keyof T] extends Function ? keyof T : never]' is not assignable to type '(...args: any) => any'.
          Type 'T[keyof T]' is not assignable to type '(...args: any) => any'.
            Type 'T[string] | T[number] | T[symbol]' is not assignable to type '(...args: any) => any'.
              Type 'T[string]' is not assignable to type '(...args: any) => any'.

18     [K in NonPromiseReturningFunctionPropertyNames<T>]: (...args: Parameters<T[K]>) => Promise<ReturnType<T[K]>>;
                                                                                                             ~~~~
like image 884
Shreya Jindal Avatar asked Jan 24 '23 04:01

Shreya Jindal


1 Answers

Add this 2 lines inside compilerOptions in your tsconfig.json

"skipDefaultLibCheck": true,
"skipLibCheck": true,
like image 141
Héctor Avatar answered Apr 01 '23 19:04

Héctor