TypeScript Associate — Easy
Key points
- String literal types in TypeScript allow for specific string values.
- Using the pipe symbol (|) allows for multiple valid string options.
- This restricts the Direction type to only 'left' or 'right'.
Ready to go further?
Related questions
