1 | import { SimpleDocument } from '@simple-dom/interface';
|
2 | import { ComponentDefinitionState, ComponentInstance, ComponentInstanceState } from '../components';
|
3 | import { Option } from '../core';
|
4 | import { GlimmerTreeChanges, GlimmerTreeConstruction } from '../dom/changes';
|
5 | import { DebugRenderTree } from './debug-render-tree';
|
6 | import { Owner } from './owner';
|
7 | import { ModifierInstance } from './modifier';
|
8 | import { WithCreateInstance } from '../..';
|
9 |
|
10 | export interface EnvironmentOptions {
|
11 | document?: SimpleDocument;
|
12 | appendOperations?: GlimmerTreeConstruction;
|
13 | updateOperations?: GlimmerTreeChanges;
|
14 | }
|
15 |
|
16 | export interface Transaction {}
|
17 |
|
18 | declare const TransactionSymbol: unique symbol;
|
19 | export type TransactionSymbol = typeof TransactionSymbol;
|
20 |
|
21 | export type ComponentInstanceWithCreate = ComponentInstance<
|
22 | ComponentDefinitionState,
|
23 | ComponentInstanceState,
|
24 | WithCreateInstance
|
25 | >;
|
26 |
|
27 | export interface Environment {
|
28 | [TransactionSymbol]: Option<Transaction>;
|
29 |
|
30 | didCreate(component: ComponentInstanceWithCreate): void;
|
31 | didUpdate(component: ComponentInstanceWithCreate): void;
|
32 |
|
33 | scheduleInstallModifier(modifier: ModifierInstance): void;
|
34 | scheduleUpdateModifier(modifier: ModifierInstance): void;
|
35 |
|
36 | begin(): void;
|
37 | commit(): void;
|
38 |
|
39 | getDOM(): GlimmerTreeChanges;
|
40 | getAppendOperations(): GlimmerTreeConstruction;
|
41 |
|
42 | isInteractive: boolean;
|
43 | debugRenderTree?: DebugRenderTree;
|
44 | }
|