@dxos/app-framework - v0.15.0
    Preparing search index...

    Variable contributeConst

    contribute: {
        <C extends Tag<any, any>>(
            capability: C,
            implementation: C extends Tag<T, any> ? T : never,
        ): Contribution<IdentifierOf<C>>;
        <C extends MultiTag<any, any>>(
            capability: C,
            implementation: C extends MultiTag<T, any> ? T : never,
        ): Contribution<IdentifierOf<C>>;
    } = ...

    Contributes an implementation for a declared capability. Arity-aware: passing a multi capability where a singleton is expected (or vice versa) is rejected by the value parameter type.

    Teardown belongs to the module's scope, not the contribution: yield* Effect.addFinalizer(...) in the module body. One mechanism covers resources that are not contributions, and finalizers run in a defined order relative to each other.

    Type declaration