Constraining a generic parameter to be a record with a single key in Typescript
I would like to constrain the a generic parameter T
of a class MyClass<T>
such that T
is valid for any record which has only 1 key:
I would like to constrain the a generic parameter T
of a class MyClass<T>
such that T
is valid for any record which has only 1 key: