@univerjscorefunctionsDependenton

@univerjs/core v0.5.0-beta.1Docs


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

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/services/plugin/plugin.service.ts:42