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

    Function layerWith

    • Constructs a layer from a capability by resolving it from the capability manager and passing the value to build. Lets a consumer depend on a canonical service (e.g. Identity.Service) and have it provided from a capability without the consumer referencing the capability system:

      effect.pipe(
      Effect.provide(Capability.layerWith(ClientCapabilities.IdentityService, (service) =>
      Layer.succeed(Identity.Service, service),
      )),
      );

      Type Parameters

      • T
      • A
      • E
      • R

      Parameters

      Returns Layer<A, E, Capability.Service | R>