Skip to content

DeletableRecordKey

DeletableRecordKey<T> = string extends keyof T ? string : never | number extends keyof T ? number : never | OptionalKeyOf<T>

Defined in: state/reactive.ts:75

The keys ReactiveRecord.delete accepts: the keys of an index signature (Record<string, V>) plus any key declared optional.

A required key is excluded on purpose. get() returns Readonly<T>, so get().hp is typed number on a { hp: number } record — removing it would leave that read typed but missing at runtime. Deleting from an open-ended bag keeps the contract intact, so that is where delete applies.

T

Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/core.md.