Skip to content

kernel/modules/manifest

Defined in: app/src/kernel/modules/manifest.ts:74

Thrown for invalid manifests and inconsistent module graphs.

  • Error

new ModuleError(message?): ModuleError

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1080

string

ModuleError

Error.constructor

new ModuleError(message?, options?): ModuleError

Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts:1080

string

ErrorOptions

ModuleError

Error.constructor

readonly name: "ModuleError" = 'ModuleError'

Defined in: app/src/kernel/modules/manifest.ts:75

Error.name

Defined in: app/src/kernel/modules/manifest.ts:37

The code of a feature module that runs in the browser process.

activate(context): void | Promise<void>

Defined in: app/src/kernel/modules/manifest.ts:42

Starts the module: registers its contributions in context.subscriptions.

ModuleContext

The module’s context.

void | Promise<void>

optional deactivate(): void | Promise<void>

Defined in: app/src/kernel/modules/manifest.ts:44

Stops work that subscriptions cannot undo by themselves. Optional.

void | Promise<void>

optional dispose(): void

Defined in: app/src/kernel/modules/manifest.ts:46

Releases resources the module holds outside its subscriptions. Optional.

void


Defined in: app/src/kernel/modules/manifest.ts:9

Decides whether an optional module is active.

readonly default: boolean

Defined in: app/src/kernel/modules/manifest.ts:15

Whether the module is active when neither policy nor setting decide.

readonly optional policy?: string

Defined in: app/src/kernel/modules/manifest.ts:13

Policy name that administrators use to force the module on or off.

readonly optional setting?: string

Defined in: app/src/kernel/modules/manifest.ts:11

Setting key that switches the module on or off, such as workspaces.enabled.


Defined in: app/src/kernel/modules/manifest.ts:19

Everything a module receives when it is activated.

readonly id: string

Defined in: app/src/kernel/modules/manifest.ts:21

The module’s own identifier.

readonly logger: Logger

Defined in: app/src/kernel/modules/manifest.ts:33

A logger scoped to module.<id>.

readonly services: 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.

readonly subscriptions: 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.


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.

readonly optional activation?: ModuleActivation

Defined in: app/src/kernel/modules/manifest.ts:66

How an optional module is switched on and off. Required unless core is set.

readonly optional core?: 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.

readonly optional dependsOn?: readonly string[]

Defined in: app/src/kernel/modules/manifest.ts:64

Modules that must be active before this one.

readonly id: string

Defined in: app/src/kernel/modules/manifest.ts:57

readonly optional main?: () => Promise<{ default: FeatureModuleClass; }>

Defined in: app/src/kernel/modules/manifest.ts:70

Imports the module’s browser-process code.

Promise<{ default: FeatureModuleClass; }>

readonly optional restartRequired?: boolean

Defined in: app/src/kernel/modules/manifest.ts:68

Whether switching the module on or off only takes effect after a restart.

FeatureModuleClass = InjectableClass<FeatureModule>

Defined in: app/src/kernel/modules/manifest.ts:50

A feature module class, constructed by the module’s container.


ModuleId = string

Defined in: app/src/kernel/modules/manifest.ts:6

Identifier of a feature module, in kebab-case, such as tab-groups.

defineModule<M>(manifest): Readonly<M>

Defined in: app/src/kernel/modules/manifest.ts:86

Declares a feature module and checks its manifest.

M extends ModuleManifest

M

The module’s static description.

Readonly<M>

The frozen manifest.

ModuleError for an invalid id or a missing activation on an optional module.