here is the code:
type TypeKey = 'A' | 'B' | 'C'
type Types = { [key in TypeKey] : string}
let myTypes : Types = {
A : 'Apple',
B : 'Banna'
}
this will have an error:
error: TS2741 [ERROR]: Property 'C' is missing in type '{ A: string; B: string; }' but required in type 'Types'.
How to make 'C' optional? thanks