kernel/modules/manifest
Classes
Section titled “Classes”ModuleError
Section titled “ModuleError”Defined in: app/src/kernel/modules/manifest.ts:74
Thrown for invalid manifests and inconsistent module graphs.
Extends
Section titled “Extends”Error
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ModuleError(
message?):ModuleError
Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1080
Parameters
Section titled “Parameters”message?
Section titled “message?”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Error.constructor
Constructor
Section titled “Constructor”new ModuleError(
message?,options?):ModuleError
Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1080
Parameters
Section titled “Parameters”message?
Section titled “message?”string
options?
Section titled “options?”ErrorOptions
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Error.constructor
Properties
Section titled “Properties”
readonlyname:"ModuleError"='ModuleError'
Defined in: app/src/kernel/modules/manifest.ts:75
Overrides
Section titled “Overrides”Error.name
Interfaces
Section titled “Interfaces”FeatureModule
Section titled “FeatureModule”Defined in: app/src/kernel/modules/manifest.ts:37
The code of a feature module that runs in the browser process.
Methods
Section titled “Methods”activate()
Section titled “activate()”activate(
context):void|Promise<void>
Defined in: app/src/kernel/modules/manifest.ts:42
Starts the module: registers its contributions in context.subscriptions.
Parameters
Section titled “Parameters”context
Section titled “context”The module’s context.
Returns
Section titled “Returns”void | Promise<void>
deactivate()?
Section titled “deactivate()?”
optionaldeactivate():void|Promise<void>
Defined in: app/src/kernel/modules/manifest.ts:44
Stops work that subscriptions cannot undo by themselves. Optional.
Returns
Section titled “Returns”void | Promise<void>
dispose()?
Section titled “dispose()?”
optionaldispose():void
Defined in: app/src/kernel/modules/manifest.ts:46
Releases resources the module holds outside its subscriptions. Optional.
Returns
Section titled “Returns”void
ModuleActivation
Section titled “ModuleActivation”Defined in: app/src/kernel/modules/manifest.ts:9
Decides whether an optional module is active.
Properties
Section titled “Properties”default
Section titled “default”
readonlydefault:boolean
Defined in: app/src/kernel/modules/manifest.ts:15
Whether the module is active when neither policy nor setting decide.
policy?
Section titled “policy?”
readonlyoptionalpolicy?:string
Defined in: app/src/kernel/modules/manifest.ts:13
Policy name that administrators use to force the module on or off.
setting?
Section titled “setting?”
readonlyoptionalsetting?:string
Defined in: app/src/kernel/modules/manifest.ts:11
Setting key that switches the module on or off, such as workspaces.enabled.
ModuleContext
Section titled “ModuleContext”Defined in: app/src/kernel/modules/manifest.ts:19
Everything a module receives when it is activated.
Properties
Section titled “Properties”
readonlyid:string
Defined in: app/src/kernel/modules/manifest.ts:21
The module’s own identifier.
logger
Section titled “logger”
readonlylogger:Logger
Defined in: app/src/kernel/modules/manifest.ts:33
A logger scoped to module.<id>.
services
Section titled “services”
readonlyservices:Container
Defined in: app/src/kernel/modules/manifest.ts:26
The module’s child container. Services registered here are private to the module and disposed when it is deactivated.
subscriptions
Section titled “subscriptions”
readonlysubscriptions:DisposableStore
Defined in: app/src/kernel/modules/manifest.ts:31
Registrations to undo on deactivation: commands, IPC handlers, listeners and UI slots all go here.
ModuleManifest
Section titled “ModuleManifest”Defined in: app/src/kernel/modules/manifest.ts:56
Static description of a feature module. Manifests are tiny and always bundled; the code
behind main is a separate chunk that is only imported when the module is active.
Properties
Section titled “Properties”activation?
Section titled “activation?”
readonlyoptionalactivation?:ModuleActivation
Defined in: app/src/kernel/modules/manifest.ts:66
How an optional module is switched on and off. Required unless core is set.
readonlyoptionalcore?:boolean
Defined in: app/src/kernel/modules/manifest.ts:62
Core modules are always active and cannot be switched off. They may only depend on other core modules.
dependsOn?
Section titled “dependsOn?”
readonlyoptionaldependsOn?: readonlystring[]
Defined in: app/src/kernel/modules/manifest.ts:64
Modules that must be active before this one.
readonlyid:string
Defined in: app/src/kernel/modules/manifest.ts:57
readonlyoptionalmain?: () =>Promise<{default:FeatureModuleClass; }>
Defined in: app/src/kernel/modules/manifest.ts:70
Imports the module’s browser-process code.
Returns
Section titled “Returns”Promise<{ default: FeatureModuleClass; }>
restartRequired?
Section titled “restartRequired?”
readonlyoptionalrestartRequired?:boolean
Defined in: app/src/kernel/modules/manifest.ts:68
Whether switching the module on or off only takes effect after a restart.
Type Aliases
Section titled “Type Aliases”FeatureModuleClass
Section titled “FeatureModuleClass”FeatureModuleClass =
InjectableClass<FeatureModule>
Defined in: app/src/kernel/modules/manifest.ts:50
A feature module class, constructed by the module’s container.
ModuleId
Section titled “ModuleId”ModuleId =
string
Defined in: app/src/kernel/modules/manifest.ts:6
Identifier of a feature module, in kebab-case, such as tab-groups.
Functions
Section titled “Functions”defineModule()
Section titled “defineModule()”defineModule<
M>(manifest):Readonly<M>
Defined in: app/src/kernel/modules/manifest.ts:86
Declares a feature module and checks its manifest.
Type Parameters
Section titled “Type Parameters”M extends ModuleManifest
Parameters
Section titled “Parameters”manifest
Section titled “manifest”M
The module’s static description.
Returns
Section titled “Returns”Readonly<M>
The frozen manifest.
Throws
Section titled “Throws”ModuleError for an invalid id or a missing activation on an optional module.