1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | import type { GetContextualFreeOpcode } from '@glimmer/interfaces';
|
8 | import type { FreeVarNamespace } from './constants';
|
9 | import { COMPONENT_VAR_NS, HELPER_VAR_NS, MODIFIER_VAR_NS } from './constants';
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | export declare const STRICT_RESOLUTION: {
|
17 | resolution: () => GetContextualFreeOpcode;
|
18 | serialize: () => SerializedResolution;
|
19 | isAngleBracket: false;
|
20 | };
|
21 | export type StrictResolution = typeof STRICT_RESOLUTION;
|
22 | export declare const HTML_RESOLUTION: {
|
23 | isAngleBracket: true;
|
24 | resolution: () => GetContextualFreeOpcode;
|
25 | serialize: () => SerializedResolution;
|
26 | };
|
27 | export type HtmlResolution = typeof HTML_RESOLUTION;
|
28 | export declare function isStrictResolution(value: unknown): value is StrictResolution;
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | export declare class LooseModeResolution {
|
36 | readonly namespaces: Namespaces;
|
37 | readonly isAngleBracket: boolean;
|
38 | |
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 | static namespaced(namespace: FreeVarNamespace, isAngleBracket?: boolean): LooseModeResolution;
|
47 | |
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 | static append(): LooseModeResolution;
|
62 | |
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 | static trustingAppend(): LooseModeResolution;
|
77 | constructor(namespaces: Namespaces, isAngleBracket?: boolean);
|
78 | resolution(): GetContextualFreeOpcode;
|
79 | serialize(): SerializedResolution;
|
80 | }
|
81 | export declare const HELPER_NAMESPACE: "Helper";
|
82 | export declare const MODIFIER_NAMESPACE: "Modifier";
|
83 | export declare const COMPONENT_NAMESPACE: "Component";
|
84 | /**
|
85 | * A `Namespaced` must be resolved in one or more namespaces.
|
86 | *
|
87 | * ```hbs
|
88 | * <X />
|
89 | * ```
|
90 | *
|
91 | * ^ `X` is resolved in the `component` namespace
|
92 | *
|
93 | * ```hbs
|
94 | * (x)
|
95 | * ```
|
96 | *
|
97 | * ^ `x` is resolved in the `helper` namespace
|
98 | *
|
99 | * ```hbs
|
100 | * <a {{x}} />
|
101 | * ```
|
102 | *
|
103 | * ^ `x` is resolved in the `modifier` namespace
|
104 | */
|
105 | type Namespaces = [HELPER_VAR_NS] | [MODIFIER_VAR_NS] | [COMPONENT_VAR_NS] | [COMPONENT_VAR_NS, HELPER_VAR_NS];
|
106 | export type FreeVarResolution = StrictResolution | HtmlResolution | LooseModeResolution;
|
107 | export type SerializedResolution = 'Strict' | 'Helper' | 'Modifier' | 'Component' | 'ComponentOrHelper';
|
108 | export declare function loadResolution(resolution: SerializedResolution): FreeVarResolution;
|
109 | export {};
|
110 |
|
\ | No newline at end of file |