@midwayjs/async-hooks-context-managerClassesAsyncLocalStorageContextManager版本:Next本页总览AsyncLocalStorageContextManager ImplementsAsyncContextManagerIndex ConstructorsconstructorMethodsactivebinddisableenablewithConstructors constructornew AsyncLocalStorageContextManager(): AsyncLocalStorageContextManagerMethods activeactive(): AsyncContextbindbind<T>(context: AsyncContext, target: T): TBinds a the certain context or the active one to the target function and then returns the targetType parametersTdisabledisable(): AsyncLocalStorageContextManagerenableenable(): AsyncLocalStorageContextManagerwithwith<A, F>(context: AsyncContext, fn: F, thisArg?: ThisParameterType<F>, ...args: A): ReturnType<F>Type parametersA: unknown[]F: (...args: A) => ReturnType<F>
Binds a the certain context or the active one to the target function and then returns the target