type alias ServiceScope
Since 0.1.0

Service lifecycle scopes.

  • singleton — one instance for the application lifetime (default)
  • scoped — one instance per IContainer.createScope scope. A scope is a child container the application creates and disposes explicitly; the framework creates no scope per request, so a scoped service is NOT re-created on every HTTP request.
  • transient — a new instance per resolution

Definition

"singleton" | "scoped" | "transient"

Usage

import { type ServiceScope } from "common/src/index.ts";