UNPKG

519 BTypeScriptView Raw
1import { Binding } from './binding';
2import { Context } from './context';
3/**
4 * Events emitted by a context
5 */
6export declare type ContextEvent = {
7 /**
8 * Source context that emits the event
9 */
10 context: Context;
11 /**
12 * Binding that is being added/removed/updated
13 */
14 binding: Readonly<Binding<unknown>>;
15 /**
16 * Event type
17 */
18 type: string;
19};
20/**
21 * Synchronous listener for context events
22 */
23export declare type ContextEventListener = (event: ContextEvent) => void;