API reference › @evolu/common › Resource › BorrowedResource

type BorrowedResource<T extends Resource> = DistributiveOmit<
  T,
  typeof Symbol.dispose | typeof Symbol.asyncDispose
>;

Defined in: packages/common/src/Resource.ts:91

Borrowed Resource.

A borrowed resource removes disposal methods from a Resource's type. The runtime object is unchanged.

Another abstraction owns the resource and controls its lifecycle. Exposing disposal in the type would break that ownership and allow callers to dispose a resource they do not own.