@univerjscoreclassesUniver

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


Class: Univer

Constructors

new Univer()

new Univer(config, parentInjector?): Univer

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

Defined in

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

Methods

__getInjector()

__getInjector(): Injector

Returns

Injector

Defined in

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


createUnit()

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

Type Parameters

Type Parameter
T
U extends UnitModel<object, number>

Parameters

ParameterType
typenumber
dataPartial<T>

Returns

U

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:109


createUniverDoc()

createUniverDoc(data): DocumentDataModel

Parameters

ParameterType
dataPartial<IDocumentData>

Returns

DocumentDataModel

Deprecated

use createUnit instead

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:126


createUniverSheet()

createUniverSheet(data): Workbook

Create a univer sheet instance with internal dependency injection.

Parameters

ParameterType
dataPartial<IWorkbookData>

Returns

Workbook

Deprecated

use createUnit instead

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:118


createUniverSlide()

createUniverSlide(data): SlideDataModel

Parameters

ParameterType
dataPartial<ISlideData>

Returns

SlideDataModel

Deprecated

use createUnit instead

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:134


dispose()

dispose(): void

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:101


registerPlugin()

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

Register a plugin into univer.

Type Parameters

Type Parameter
T extends PluginCtor<Plugin>

Parameters

ParameterType
pluginT
config?ConstructorParameters<T>[0]

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:174


setLocale()

setLocale(locale): void

Parameters

ParameterType
localeLocaleType

Returns

void

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/core/src/univer.ts:105