ts cast string literal type to string code example
Example: typescript string to string literal
// stringLiteral is type of 'someString', not string
const stringLiteral = 'someString' as 'someString';
// stringLiteral is type of 'someString', not string
const stringLiteral = 'someString' as 'someString';