literal type typescript code example
Example 1: use type as value typescript
Typescript interfaces aren''t being compiled into the js output, and you can not use them at runtime
Example 2: typescript string to string literal
// stringLiteral is type of 'someString', not string
const stringLiteral = 'someString' as 'someString';