@glint/template 1.4.1-unstable.acdc718 → 1.4.1-unstable.b0d2069
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/-private/dsl/emit.d.ts +12 -10
- package/package.json +1 -1
package/-private/dsl/emit.d.ts
CHANGED
|
@@ -38,10 +38,10 @@ export declare function emitContent(value: ContentValue): void;
|
|
|
38
38
|
*
|
|
39
39
|
* Would produce code like:
|
|
40
40
|
*
|
|
41
|
-
* emitElement('div', (
|
|
42
|
-
* applySplattributes(
|
|
43
|
-
* applyAttributes(
|
|
44
|
-
* applyModifier(
|
|
41
|
+
* emitElement('div', (__glintY__) => {
|
|
42
|
+
* applySplattributes(__glintRef__.element, __glintY__.element);
|
|
43
|
+
* applyAttributes(__glintY__.element, { class: 'hello' });
|
|
44
|
+
* applyModifier(__glintY__.element, resolve(on)({}, 'click', this.clicked));
|
|
45
45
|
* });
|
|
46
46
|
*/
|
|
47
47
|
export declare function emitElement<Name extends string>(
|
|
@@ -60,8 +60,8 @@ export declare function emitElement<Name extends string>(
|
|
|
60
60
|
* This form of invocation is the only one in a template that may have
|
|
61
61
|
* blocks bound to it. The final line above would produce code like:
|
|
62
62
|
*
|
|
63
|
-
* emitComponent(resolve(Value)({ foo: bar })), (
|
|
64
|
-
* applyModifier(
|
|
63
|
+
* emitComponent(resolve(Value)({ foo: bar })), (__glintY__) => {
|
|
64
|
+
* applyModifier(__glintY__.element, resolve(baz)({}));
|
|
65
65
|
* });
|
|
66
66
|
*/
|
|
67
67
|
export declare function emitComponent<T extends ComponentReturn<any, any>>(
|
|
@@ -81,7 +81,9 @@ export declare function emitComponent<T extends ComponentReturn<any, any>>(
|
|
|
81
81
|
export declare function templateExpression<
|
|
82
82
|
Signature extends AnyFunction = () => ComponentReturn<{}>,
|
|
83
83
|
Context extends AnyContext = TemplateContext<void, {}, {}, void>,
|
|
84
|
-
>(
|
|
84
|
+
>(
|
|
85
|
+
f: (__glintRef__: Context, __glintDSL__: never) => void,
|
|
86
|
+
): new () => InvokableInstance<Signature> & HasContext<Context>;
|
|
85
87
|
|
|
86
88
|
/*
|
|
87
89
|
* Wraps a template body that's backed by a known value (typically a class), either
|
|
@@ -98,7 +100,7 @@ export declare function templateExpression<
|
|
|
98
100
|
*/
|
|
99
101
|
export declare function templateForBackingValue<Args extends unknown[], Context extends AnyContext>(
|
|
100
102
|
backingValue: abstract new (...args: Args) => HasContext<Context>,
|
|
101
|
-
body: (
|
|
103
|
+
body: (__glintRef__: Context, __glintDSL__: never) => void,
|
|
102
104
|
): abstract new () => unknown;
|
|
103
105
|
|
|
104
106
|
/*
|
|
@@ -108,10 +110,10 @@ export declare function templateForBackingValue<Args extends unknown[], Context
|
|
|
108
110
|
*
|
|
109
111
|
* Is equivalent to:
|
|
110
112
|
*
|
|
111
|
-
* yieldToBlock(
|
|
113
|
+
* yieldToBlock(__glintRef__, 'name')(foo, bar);
|
|
112
114
|
*/
|
|
113
115
|
export declare function yieldToBlock<Context extends AnyContext, K extends keyof Context['blocks']>(
|
|
114
|
-
|
|
116
|
+
__glintRef__: Context,
|
|
115
117
|
to: K,
|
|
116
118
|
): (...values: NonNullable<Context['blocks'][K]>) => void;
|
|
117
119
|
|
package/package.json
CHANGED