TypeScriptType Guardsas const

Asserts that an object or array literal's values are treated as literal types.

Syntax

const obj = { ... } as const