Optional Keys for Records or Structures in TypeScript

Hey, if I have a schema literal of strings like "RED", "ORANGE", "YELLOW" and want to use them as optional keys for a record or struct, how would I do so? Right now it requires every value in the literal to be defined.
Was this page helpful?