Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

EntityFieldsOptions

EntityFieldsOptions<Record, Listed> = [EntityPath<Record>] extends [never] ? object : object & [Exclude<EntityPath<Record>, Listed>] extends [never] ? unknown : object & [NonNullEntityPath<Record>] extends [never] ? unknown : object

A trait’s or an event’s entities: required where a field holds an entity, and naming each such field, since a destroy nulls each one it names and leaves any other holding a dead handle, which koota reads by index as whichever entity takes it next; and both ends compare a predicted trait, where each entity’s number differs between them. A field the list leaves out is named in the type error, as the missing unlistedEntityFields, and a field typed without null, which a destroy nulls, as the missing entityFieldsHoldNull.

Type Parameter
Record
Listed extends string