UNPKG

ayanami

Version:
13 lines (12 loc) 695 B
/// <reference types="qs" /> import { Request } from 'express'; import { ConstructorOf } from '../types'; import { Scope } from './type'; declare type Instance = any; export declare const ayanamiInstances: Map<Scope, Instance[]>; export declare function createOrGetInstanceInScope<T>(constructor: ConstructorOf<T>, scope: Scope): T; export declare function createScopeWithRequest(req: Request, scope: any | undefined): Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>> | { req: Request<import("express-serve-static-core").ParamsDictionary, any, any, import("qs").ParsedQs, Record<string, any>>; scope: any; }; export {};