My goal is that foo accepts any object which extends an Obs<T>
. However I get the following error.
Argument of type '{ reset: () => number; x: number; set: (x: number) => number; }' is not assignable to parameter of type 'Obs<unknown>'.
Object literal may only specify known properties, and 'reset' does not exist in type 'Obs<unknown>'
Snippet A
{
// add a generic method