TypeScript型ガードas const
satisfies

as const型ガード

type predicate

オブジェクトや配列のすべての値をリテラル型として推論します。

構文

const obj = { ... } as const