This might be too complex, but in trying to work around #12624
interface Options<Data, Computed> {
data?: Data
computed?: Computed;
}
declare class Component<Data, Computed> {
constructor(options: Options<Data, Computed>);
get<K extends keyof Data | keyof Computed>(key: K): (Data & Computed)[K];
}
I get the following error
Type K cannot be used to index into type Data & Computed.
Which I believe should be valid.
This might be too complex, but in trying to work around #12624
I get the following error
Which I believe should be valid.