MyRecord
MediumImplement MyRecord<K, T> which constructs an object type with keys K and values T.
TypeScript•UTF-8
Run your code to see results.
Click the Run button above
MyRecord
MediumImplement MyRecord<K, T> which constructs an object type with keys K and values T.
Examples:
Input 1: type Pages = MyRecord<"home" | "about", PageInfo>
Output 1: { home: PageInfo; about: PageInfo }
Output
Run your code to see results.