-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
Describe the bug
A typescript error occurs when using the Subject as a type. Can someone help with this, please?
Argument of type '(subscription: Subject<void>) => void' is not assignable to parameter of type '(value: { closed: boolean; observers: { next: (value: void) => void; error: (err: any) => void; complete: () => void; }[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: <R>(operator: Operator<void, R>) => Observable<...>; ... 11 more ...; toPromise: { ...; }; }, index: number, array: { ...; }[]) => ...'.
Types of parameters 'subscription' and 'value' are incompatible.
Property 'currentObservers' is missing in type '{ closed: boolean; observers: { next: (value: void) => void; error: (err: any) => void; complete: () => void; }[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: <R>(operator: Operator<void, R>) => Observable<...>; ... 11 more ...; toPromise: { ...; }; }' but required in type 'Subject<void>'.Expected behavior
When using the Subject as a type, typescript errors should not occur
Reproduction code
No response
Reproduction URL
https://stackblitz.com/edit/nuxt-starter-hvcakf?file=app.vue
Version
7.8.0
Environment
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels
