Packages
recs
interfaces
Component

@latticexyz/recs / Component

Interface: Component

Type of component returned by defineComponent.

Type parameters

NameType
Sextends Schema = Schema
Mextends Metadata = Metadata
Tundefined

Hierarchy

Table of contents

Properties

Properties

entities

entities: () => IterableIterator<EntityIndex>

Type declaration

▸ (): IterableIterator<EntityIndex>

Returns

IterableIterator<EntityIndex>

Defined in

types.ts:82 (opens in a new tab)


id

id: string

Defined in

types.ts:78 (opens in a new tab)


metadata

metadata: M

Defined in

types.ts:81 (opens in a new tab)


schema

schema: S

Defined in

types.ts:80 (opens in a new tab)


update$

update$: Subject<ComponentUpdate & { observers: any }

Defined in

types.ts:85 (opens in a new tab)


values

values: { [key in string | number | symbol]: Map<EntityIndex, ValueType<T>[S[key]]> }

Defined in

types.ts:79 (opens in a new tab)


world

world: World

Defined in

types.ts:83 (opens in a new tab)