At this line in cart.component.ts ( this.msg.getMsg().subscribe((product:Product) =>) i am getting error how to solve this
No overload matches this call.
Overload 1 of 5, '(observer?: NextObserver | ErrorObserver | CompletionObserver | undefined): Subscription', gave the following error.
Argument of type '(product: Product) => void' is not assignable to parameter of type 'NextObserver | ErrorObserver | CompletionObserver | undefined'.
Property 'complete' is missing in type '(product: Product) => void' but required in type 'CompletionObserver'.
Overload 2 of 5, '(next?: ((value: unknown) => void) | undefined, error?: ((error: any) => void) | undefined, complete?: (() => void) | undefined): Subscription', gave the following error.
Argument of type '(product: Product) => void' is not assignable to parameter of type '(value: unknown) => void'.
Types of parameters 'product' and 'value' are incompatible.
Type 'unknown' is not assignable to type 'Product'.ts(2769)
I think this is related to some coding error, kindly compare my code of the specific video with yours. You can get code related to all the parts from this google drive link.
At this line in cart.component.ts ( this.msg.getMsg().subscribe((product:Product) =>) i am getting error how to solve this
No overload matches this call. Overload 1 of 5, '(observer?: NextObserver | ErrorObserver | CompletionObserver | undefined): Subscription', gave the following error.
Argument of type '(product: Product) => void' is not assignable to parameter of type 'NextObserver | ErrorObserver | CompletionObserver | undefined'.
Property 'complete' is missing in type '(product: Product) => void' but required in type 'CompletionObserver'.
Overload 2 of 5, '(next?: ((value: unknown) => void) | undefined, error?: ((error: any) => void) | undefined, complete?: (() => void) | undefined): Subscription', gave the following error.
Argument of type '(product: Product) => void' is not assignable to parameter of type '(value: unknown) => void'.
Types of parameters 'product' and 'value' are incompatible.
Type 'unknown' is not assignable to type 'Product'.ts(2769)