@latticexyz/recs / Component

# Interface: Component<S, M, T>

Type of component returned by defineComponent.

# Type parameters

Name Type
S extends Schema = Schema
M extends Metadata = Metadata
T undefined

# Hierarchy

# Table of contents

# Properties

  • entities
  • id
  • metadata
  • schema
  • update$
  • values
  • world

# Properties

# entities

entities: () => IterableIterator<EntityIndex>

# Type declaration

▸ (): IterableIterator<EntityIndex>

# Returns

IterableIterator<EntityIndex>

# Defined in

types.ts:82


# id

id: string

# Defined in

types.ts:78


# metadata

metadata: M

# Defined in

types.ts:81


# schema

schema: S

# Defined in

types.ts:80


# update$

update$: Subject<ComponentUpdate<S, T>> & { observers: any }

# Defined in

types.ts:85


# values

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

# Defined in

types.ts:79


# world

world: World

# Defined in

types.ts:83