Optional[symbolOptionalconfigOptional validation schema for runtime config validation. When provided, resource config will be validated when .with() is called.
OptionalcontextCreate a private, mutable context shared between init and dispose.
OptionaldependenciesStatic or lazy dependency map. Receives config when provided.
OptionaldisposeClean-up function for the resource. This is called when the resource is no longer needed.
The value of the resource (undefined if no init method)
The configuration it received
The dependencies it needed
Promise
Stable identifier.
OptionalinitInitialize and return the resource value. Called once during boot.
OptionalmetaOptionalmiddlewareMiddleware applied around init/dispose.
OptionaloverridesSafe overrides to swap behavior while preserving identities. See README: Overrides.
OptionalregisterRegister other registerables (resources/tasks/middleware/events). Accepts a
static array or a function of config to support dynamic wiring.
OptionalresultOptional validation schema for the resource's resolved value.
When provided, the value will be validated immediately after init resolves,
without considering middleware.
Optionaltags
This is optional and used from an index resource to get the correct caller. This is the reason we allow it here as well.