79446428

Date: 2025-02-17 19:33:44
Score: 3
Natty:
Report link

The answer (linked by another Stackoverflow user) is to use a combination of typeof and keyof:

type AnnotationKey = typeof ANNOTATION_KEYS[keyof typeof ANNOTATION_KEYS];
Reasons:
  • Blacklisted phrase (1): Stackoverflow
  • Low length (1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: PapaGing99