ReplaceKeys
HardWrite ReplaceKeys<T, K, V> which replaces all keys of type K with type V in object T.
TypeScript•UTF-8
Run your code to see results.
Click the Run button above
ReplaceKeys
HardWrite ReplaceKeys<T, K, V> which replaces all keys of type K with type V in object T.
Examples:
Input 1: type Result = ReplaceKeys<{ a: string, b: number }, "a", boolean>
Output 1: { a: boolean, b: number }
Output
Run your code to see results.