import { SessionStore } from './base'; import { TSessionFn, TSessionMatcher } from './definitions'; /** A session manager that is single-process for each user */ export declare class SingleSessionManager extends SessionStore { /** Stores streams of active sessions */ private readonly _streams; /** * set an empty Stream Map and the symbol when new template is added * @param session the function for generating sessions * @param match determines whether the session should be created or not * @param override determines when the condition is matched, * whether to force end the previous session (true) * or ignore this context (false or not determined) */ use(session: TSessionFn, match: TSessionMatcher, override?: boolean): this; /** * Pass a context to current active session * If no existing ones, check which session can be created, last ones has higher priority * Additionally, override templates will take over even when there's a session running * @param ctx the context */ run(ctx: T): Promise; }