@latticexyz/recs / ComponentWithStream

# Interface: ComponentWithStream<S, T>

Type of component returned by defineComponent.

# Type parameters

Name Type
S extends Schema
T undefined

# Hierarchy

# Table of contents

# Properties

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

# Properties

# entities

entities: () => IterableIterator<EntityIndex>

# Type declaration

▸ (): IterableIterator<EntityIndex>

# Returns

IterableIterator<EntityIndex>

# Inherited from

Component.entities

# Defined in

types.ts:82


# id

id: string

# Inherited from

Component.id

# Defined in

types.ts:78


# metadata

metadata: Metadata

# Inherited from

Component.metadata

# Defined in

types.ts:81


# schema

schema: S

# Inherited from

Component.schema

# Defined in

types.ts:80


# stream$

stream$: Subject<{ entity: EntityIndex ; value: undefined | ComponentValue<S, T> }>

# Defined in

types.ts:100


# update$

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

# Inherited from

Component.update$

# Defined in

types.ts:85


# values

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

# Inherited from

Component.values

# Defined in

types.ts:79


# world

world: World

# Inherited from

Component.world

# Defined in

types.ts:83