I have 2 pretty similar interfaces:
interface Foo {
value: boolean;
time: string;
}
interface ReactiveFoo {
value: BehaviorSubject<boolean>;
time: BehaviorSubject<string>;
}
I would prefer to avoid the code duplication and make the ReactiveFoo interface to kind of extend Foo. I know that there are utility types such as Partial or Readonly
Maybe is it a way to do something like this (doesn't work):
type ReactiveFoo = Wrapped<Foo, BehaviourSubject>
P.S. Also BehaviourSubject is a generic type, that required an argument, not sure if it's possible to pass it without an argument