Endo
    Preparing search index...

    Type Alias ClassContext<S, M>

    The this context for methods of a single-facet exo (makeExo, defineExoClass).

    • this.state — the sealed object returned by init(). For defineExoClass, S is ReturnType<init> (typically a plain object like { count: number }). For makeExo (which has no init), S is {} — an empty object with no accessible state.
    • this.self — the exo instance itself (the object whose methods you're implementing). Useful for passing "yourself" to other code.

    Not available on kits. Multi-facet exos use KitContext instead, which provides this.facets (the record of all facet instances in the cohort) rather than this.self.

    type ClassContext<S = any, M extends Methods = any> = {
        self: M;
        state: S;
    }

    Type Parameters

    Index

    Properties

    Properties

    self: M
    state: S