Module interface
Home > @rimitive/core > Module
Module interface
Section titled “Module interface”A module definition - the unit of composition in Rimitive.
Modules declare their dependencies and provide a create function that receives resolved dependencies and returns the implementation.
Signature:
export interface Module<TName extends string = string, TImpl = unknown, TDeps = unknown>Properties
Section titled “Properties”|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
Modules this module depends on (resolved by compose) | |||
|
TName |
Unique name - becomes the property name on the composed context | ||
|
typeof STATUS_MODULE |
Status marker for runtime type discrimination |
Methods
Section titled “Methods”|
Method |
Description |
|---|---|
|
Create the implementation with resolved dependencies | |
|
(Optional) Optional: called when context is disposed | |
|
(Optional) Optional: called when module is added to context | |
|
(Optional) Optional: wrap impl for debugging/profiling when instrumentation is enabled |