@univerjs/engine-formula v0.5.0-beta.1 • Docs
Class: FunctionService
Extends
Implements
Constructors
new FunctionService()
new FunctionService(): FunctionService
Returns
Inherited from
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:93 |
Methods
dispose()
dispose(): void
Returns
void
Overrides
Defined in
submodules/univer/packages/engine-formula/src/services/function.service.ts:64
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:96
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:100
getDescription()
getDescription(functionToken): undefined | IFunctionInfo
Parameters
Parameter | Type |
---|---|
functionToken | IFunctionNames |
Returns
undefined
| IFunctionInfo
Implementation of
IFunctionService
.getDescription
Defined in
submodules/univer/packages/engine-formula/src/services/function.service.ts:113
getDescriptions()
getDescriptions(): Map<IFunctionNames, IFunctionInfo>
Returns
Map
<IFunctionNames
, IFunctionInfo
>
Implementation of
IFunctionService
.getDescriptions
Defined in
submodules/univer/packages/engine-formula/src/services/function.service.ts:109
getExecutor()
getExecutor(functionToken): undefined | BaseFunction
Obtain the operator of the function to reuse the calculation logic. The argument type accepted by the function is: FunctionVariantType. For instance, the sum formula capability is needed for the statistics bar. You can obtain the calculation result by using const sum = formulaService.getExecutor(FUNCTION_NAMES_MATH.SUM); sum.calculate(new RangeReferenceObject(range, sheetId, unitId), ref2, re3).
Parameters
Parameter | Type |
---|---|
functionToken | IFunctionNames |
Returns
undefined
| BaseFunction
Implementation of
Defined in
submodules/univer/packages/engine-formula/src/services/function.service.ts:80
getExecutors()
getExecutors(): Map<IFunctionNames, BaseFunction>
Returns
Map
<IFunctionNames
, BaseFunction
>
Implementation of
Defined in
submodules/univer/packages/engine-formula/src/services/function.service.ts:76
hasDescription()
hasDescription(functionToken): boolean
Parameters
Parameter | Type |
---|---|
functionToken | IFunctionNames |
Returns
boolean
Implementation of
IFunctionService
.hasDescription
Defined in
submodules/univer/packages/engine-formula/src/services/function.service.ts:117
hasExecutor()
hasExecutor(functionToken): boolean
Parameters
Parameter | Type |
---|---|
functionToken | IFunctionNames |
Returns
boolean
Implementation of
Defined in
submodules/univer/packages/engine-formula/src/services/function.service.ts:84
registerDescriptions()
registerDescriptions(...descriptions): IDisposable
Parameters
Parameter | Type |
---|---|
…descriptions | IFunctionInfo [] |
Returns
Implementation of
IFunctionService
.registerDescriptions
Defined in
submodules/univer/packages/engine-formula/src/services/function.service.ts:95
registerExecutors()
registerExecutors(...functions): void
Use register to register a function, new CustomFunction(inject, name)
Parameters
Parameter | Type |
---|---|
…functions | BaseFunction [] |
Returns
void
Implementation of
IFunctionService
.registerExecutors
Defined in
submodules/univer/packages/engine-formula/src/services/function.service.ts:69
unregisterDescriptions()
unregisterDescriptions(...functionTokens): void
Parameters
Parameter | Type |
---|---|
…functionTokens | IFunctionNames [] |
Returns
void
Implementation of
IFunctionService
.unregisterDescriptions
Defined in
submodules/univer/packages/engine-formula/src/services/function.service.ts:121
unregisterExecutors()
unregisterExecutors(...functionTokens): void
Parameters
Parameter | Type |
---|---|
…functionTokens | IFunctionNames [] |
Returns
void
Implementation of
IFunctionService
.unregisterExecutors
Defined in
submodules/univer/packages/engine-formula/src/services/function.service.ts:88