[Typescript] Key remapping in mapped types by using `as` keyword V4.2
Since TypeScript v4.2, we can do remapping by using `as` keyword
type Colors = "red" | "green" | "blue"
type ColorSelector = {
[K in Colors as `select${Capitalize<K>}`]: () => void
}
const cs: ColorSelector = {} as any
cs.selectRed()