API Reference
@univerjs
@univerjs/core
functions
Dependenton

@univerjs/core v0.4.2Docs


Function: DependentOn()

function DependentOn(...plugins): (target) => void

Use this decorator to declare dependencies among plugins. If a dependent plugin is not registered yet, Univer will automatically register it with no configuration.

For example:

⁣@DependentOn(UniverDrawingPlugin, UniverDrawingUIPlugin, UniverSheetsDrawingPlugin)
export class UniverSheetsDrawingUIPlugin extends Plugin {
}

Parameters

ParameterType
...pluginsPluginCtor<Plugin>[]

Returns

Function

Parameters

ParameterType
targetPluginCtor<Plugin>

Returns

void

Defined in

submodules/univer/packages/core/src/services/plugin/plugin.service.ts:42 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.