1 | import { Binding, BindingTag } from './binding';
|
2 | import { Context } from './context';
|
3 | import { BoundValue } from './value-promise';
|
4 |
|
5 |
|
6 |
|
7 | export declare class ContextTagIndexer {
|
8 | protected readonly context: Context;
|
9 | |
10 |
|
11 |
|
12 | readonly bindingsIndexedByTag: Map<string, Set<Readonly<Binding<unknown>>>>;
|
13 | |
14 |
|
15 |
|
16 | private bindingEventListener;
|
17 | |
18 |
|
19 |
|
20 | private tagIndexListener;
|
21 | constructor(context: Context);
|
22 | /**
|
23 | * Set up context/binding listeners and refresh index for bindings by tag
|
24 | */
|
25 | private setupTagIndexForBindings;
|
26 | /**
|
27 | * Remove tag index for the given binding
|
28 | * @param binding - Binding object
|
29 | */
|
30 | private removeTagIndexForBinding;
|
31 | /**
|
32 | * Update tag index for the given binding
|
33 | * @param binding - Binding object
|
34 | */
|
35 | private updateTagIndexForBinding;
|
36 | /**
|
37 | * Find bindings by tag leveraging indexes
|
38 | * @param tag - Tag name pattern or name/value pairs
|
39 | */
|
40 | findByTagIndex<ValueType = BoundValue>(tag: BindingTag | RegExp): Readonly<Binding<ValueType>>[];
|
41 | close(): void;
|
42 | }
|