Class: AsyncInterceptorManager<P>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/interceptor.ts:202
Type Parameters
Type Parameter |
---|
P extends Record <string , IAsyncInterceptor <any , any >> |
Constructors
new AsyncInterceptorManager()
new AsyncInterceptorManager<P>(asyncInterceptorPoints): AsyncInterceptorManager<P>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/interceptor.ts:206
Parameters
Parameter | Type |
---|---|
asyncInterceptorPoints | P |
Returns
Methods
dispose()
dispose(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/interceptor.ts:248
Returns
void
fetchThroughAsyncInterceptors()
fetchThroughAsyncInterceptors<T, C>(name, filter?): (initialValue, context) => Promise<Nullable<T>>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/interceptor.ts:217
Get the interceptors.
Type Parameters
Type Parameter |
---|
T |
C |
Parameters
Parameter | Type | Description |
---|---|---|
name | IAsyncInterceptor <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 |
---|---|
initialValue | Nullable <T > |
context | C |
Returns
Promise
<Nullable
<T
>>
getInterceptPoints()
getInterceptPoints(): P
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/interceptor.ts:244
Returns
P
interceptAsync()
interceptAsync<T>(name, interceptor): Promise<() => boolean>
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/common/interceptor.ts:228
Type Parameters
Type Parameter |
---|
T extends IAsyncInterceptor <any , any > |
Parameters
Parameter | Type |
---|---|
name | T |
interceptor | T |
Returns
Promise
<() => boolean
>