@malagu/core
Version:
16 lines • 624 B
TypeScript
export declare enum AttributeScope {
App = 0,
Request = 1,
Session = 2
}
export declare const CURRENT_CONTEXT_REQUEST_KEY = "CurrentContextRequest";
export declare class Context {
[key: string | symbol | number]: any;
static run(fn: (...args: any[]) => void): void;
static bind(fn: (...args: any[]) => void, context?: any): any;
static setCurrent(context: Context): void;
static getCurrent<T extends Context>(): T;
static setAttr(key: string, value: any, scope?: AttributeScope): void;
static getAttr<T>(key: string, scope?: AttributeScope): T;
}
//# sourceMappingURL=context.d.ts.map