Sync / foldkit-sync/do

DocumentHostLayer

type · packages/sync/src/do.ts:125

type DocumentHostLayer<Env, RP> = [RP] extends [never]
  ? {
      readonly layer?: undefined
    }
  : {
      readonly layer: (env: Env) => Layer.Layer<RP>
    }

What the resolver needs, from the environment: required exactly when it needs something. Built per upgrade and kept until the socket closes, since revalidate asks the resolver again while it is open; an upgrade that is refused closes it at once.