UNPKG

@puregram/scenes

Version:

Simple implementation of middleware-based scene management for puregram

16 lines (15 loc) 660 B
import { SceneInterface } from './scenes'; import { ContextInterface, Middleware } from './types'; import { SceneManagerOptions } from './scene-manager.types'; export declare class SceneManager { private repository; constructor(rawOptions?: SceneManagerOptions | SceneInterface[]); /** Checks for has a scene */ hasScene(slug: string): boolean; /** Adds scenes to the repository */ addScenes(scenes: SceneInterface[]): this; /** Returns the middleware for embedding */ get middleware(): Middleware<ContextInterface>; /** Returns the middleware for intercept */ get middlewareIntercept(): Middleware<ContextInterface>; }