@fusion-module/contracts
v0.2.0
Published
Core protocol & type contracts for fusion-module.
Downloads
517
Readme
@fusion-module/contracts
Protocol contracts and shared type definitions for fusion-module. Types only, no runtime code.
Install
pnpm add @fusion-module/contractsWhat's inside
ModuleManifest/ModuleManifestMeta— describe a remote moduleModuleRuntimeContext— runtime context passed to mounted modulesRemoteModule— themount/unmountcontract that every remote module exportsModuleEventBus/ModuleState— pub/sub and key-value state interfaces
Extending types
Use TypeScript declaration merging to add project-specific fields:
declare module '@fusion-module/contracts' {
interface ModuleRuntimeContext {
axios?: AxiosInstance
userInfo?: MyUserType
}
interface ModuleManifestMeta {
placement?: { defaultSize?: { w: number; h: number } }
}
}License
MIT
