import { PickerContext } from '../schema/types'; /** * @description * ProcessContext 可以被注入到你的 providers & modules,以便知道它是在Picker 主服务器或 worker 的上下文中执行。 * * @example * ```TypeScript * import { Injectable, OnApplicationBootstrap } from '\@nestjs/common'; * import { ProcessContext } from '\@pickerjs/core'; * * \@Injectable() * export class MyService implements OnApplicationBootstrap { * constructor(private processContext: ProcessContext) {} * * onApplicationBootstrap() { * if (this.processContext.isServer) { * // 只在服务器进程中运行的代码 * } * } * } * ``` * * @docsCategory common */ export declare class Picker { get context(): PickerContext; } /** * @description * 应该只在核心引导函数中调用,以建立当前进程上下文。 * @internal */ export declare function setPickerContext(context: PickerContext): void;