Classes
@system-inc/base-foundation · 515c140 · 4 symbols
LazyResolve
Helper class for instantiating a type lazily via a container.
Members
get(container:BaseInjectionContainer):T
ObjectFactory
Similar to a tsyringe FactoryFunction, but wrapped in a class. This allows the Provider annotation to automically create the instance when the token is resolved.
Members
createInstance(container:DependencyContainer):T
TypedBinding
Base class for typed bindings to string-named external resources (Cloudflare Durable Object namespaces, queues, R2 buckets, KV namespaces, RPC service bindings, etc.).
A binding identifies an external resource by name and carries enough
type information for typed inject decorators (@InjectDurableObjectProvider,
@InjectWorkerQueue, etc.) to express their resolution contract via
TypedParameterDecorator<TResolved>.
Concrete subclasses each carry a unique phantom brand so TypeScript
distinguishes them structurally — passing a DurableObjectBinding
to @InjectWorkerQueue is a compile error, not a runtime surprise.
Bindings are typically defined as static members of a *Injections
class:
Members
name:stringtoString():string
TypedInjectionKey
Typed wrapper for an injection token. Carries the type that the token
resolves to so @Inject(...) parameter types can be statically verified
to match the registered type.
Use as a static member of an *Injections class:
At runtime, instances are valid tsyringe tokens — tsyringe's container
uses reference equality for token lookup, so the same TypedInjectionKey
instance must be passed at both registration and injection sites.
Members
name:stringtoString():string