ayanami
Version:
A better way to react with state
9 lines (8 loc) • 458 B
TypeScript
import { ConstructorOf } from '../types';
import { ScopeConfig } from './type';
import { createScopeWithRequest } from './utils';
import { SameScope } from './same-scope-decorator';
export { ScopeConfig, SameScope, createScopeWithRequest };
export declare const TransientScope: unique symbol;
export declare const SingletonScope: unique symbol;
export declare function getInstanceWithScope<T>(constructor: ConstructorOf<T>, scope?: ScopeConfig['scope']): T;