Class: InterceptorManager<P>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/interceptor.ts:93
Type Parameters
Type Parameter |
---|
P extends Record <string , IInterceptor <any , any >> |
Constructors
new InterceptorManager()
new InterceptorManager<P>(interceptorPoints): InterceptorManager<P>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/interceptor.ts:97
Parameters
Parameter | Type |
---|---|
interceptorPoints | P |
Returns
Methods
dispose()
dispose(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/interceptor.ts:138
Returns
void
fetchThroughInterceptors()
fetchThroughInterceptors<T, C>(name, filter?): (initValue, initContext) => Nullable<T>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/interceptor.ts:108
Get the interceptors.
Type Parameters
Type Parameter |
---|
T |
C |
Parameters
Parameter | Type | Description |
---|---|---|
name | IInterceptor <T , C > | Name of the intercepted point. |
filter ? | (interceptor ) => boolean | A callback function to filter the interceptors. |
Returns
Function
It will return a composed interceptor function. If you will perform the interceptor repeatedly, you should cache the result instead of calling this function multiple times.
Parameters
Parameter | Type |
---|---|
initValue | Nullable <T > |
initContext | C |
Returns
Nullable
<T
>
getInterceptPoints()
getInterceptPoints(): P
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/interceptor.ts:134
Returns
P
intercept()
intercept<T>(name, interceptor): () => boolean
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/interceptor.ts:119
Type Parameters
Type Parameter |
---|
T extends IInterceptor <any , any > |
Parameters
Parameter | Type |
---|---|
name | T |
interceptor | T |
Returns
Function
Returns
boolean