@univerjscoreclassesUniver

@univerjs/core v0.5.4


Class: Univer

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:66

Implements

Constructors

new Univer()

new Univer(config, parentInjector?): Univer

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:85

Create a Univer instance.

Parameters

ParameterTypeDescription
configPartial<IUniverConfig>Configuration data for Univer
parentInjector?InjectorAn optional parent injector of the Univer injector. For more information, see https://redi.wendell.fun/docs/hierarchy.

Returns

Univer

Methods

__getInjector()

__getInjector(): Injector

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:97

Returns

Injector


createUnit()

createUnit<T, U>(type, data): U

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:123

Type Parameters

Type Parameter
T
U extends UnitModel

Parameters

ParameterType
typenumber
dataPartial<T>

Returns

U


createUniverDoc()

createUniverDoc(data): DocumentDataModel

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:140

Parameters

ParameterType
dataPartial<IDocumentData>

Returns

DocumentDataModel

Deprecated

use createUnit instead


createUniverSheet()

createUniverSheet(data): Workbook

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:132

Create a univer sheet instance with internal dependency injection.

Parameters

ParameterType
dataPartial<IWorkbookData>

Returns

Workbook

Deprecated

use createUnit instead


createUniverSlide()

createUniverSlide(data): SlideDataModel

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:148

Parameters

ParameterType
dataPartial<ISlideData>

Returns

SlideDataModel

Deprecated

use createUnit instead


dispose()

dispose(): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:114

Returns

void

Implementation of

IDisposable.dispose


registerPlugin()

registerPlugin<T>(plugin, config?): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:188

Register a plugin into univer.

Type Parameters

Type Parameter
T extends PluginCtor<Plugin>

Parameters

ParameterType
pluginT
config?ConstructorParameters<T>[0]

Returns

void


setLocale()

setLocale(locale): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:119

Parameters

ParameterType
localeLocaleType

Returns

void