@glint/template 1.6.1-unstable.f415a3e → 1.6.1-unstable.ff42098
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
CHANGED
|
@@ -49,7 +49,7 @@ export declare function emitContent(value: ContentValue): void;
|
|
|
49
49
|
* applyModifier(__glintY__.element, resolve(on)({}, 'click', this.clicked));
|
|
50
50
|
* });
|
|
51
51
|
*/
|
|
52
|
-
export declare function emitElement<Name extends
|
|
52
|
+
export declare function emitElement<Name extends string | 'math' | 'svg'>(
|
|
53
53
|
name: Name,
|
|
54
54
|
): {
|
|
55
55
|
element: Name extends 'math'
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// this serves to provide a UNIQUE mapping for HtmlElementType -> Html Element Name -> Html Element Attributes
|
|
3
3
|
// typesript file lib.dom.d.ts already has e.g. HTMLElementTagNameMap,
|
|
4
4
|
// but it does not provide unique types for each element
|
|
5
|
-
export const GlintSymbol: unique symbol
|
|
5
|
+
export const GlintSymbol: unique symbol;
|
|
6
6
|
|
|
7
7
|
declare global {
|
|
8
8
|
|
package/-private/dsl/types.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ type WithDataAttributes<T> = T & Record<`data-${string}`, AttrValue>;
|
|
|
27
27
|
|
|
28
28
|
export type AttributesForElement<
|
|
29
29
|
Elem extends Element,
|
|
30
|
-
K = Elem[typeof GlintSymbol],
|
|
30
|
+
K = Elem extends { [GlintSymbol]: string } ? Elem[typeof GlintSymbol] : never,
|
|
31
31
|
> = K extends keyof HtmlElementAttributes.HtmlElements
|
|
32
32
|
? WithDataAttributes<HtmlElementAttributes.HtmlElements[K]>
|
|
33
33
|
: K extends keyof SvgElementAttributes.SvgElements
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glint/template",
|
|
3
|
-
"version": "1.6.1-unstable.
|
|
3
|
+
"version": "1.6.1-unstable.ff42098",
|
|
4
4
|
"repository": "typed-ember/glint",
|
|
5
5
|
"description": "Type definitions to back typechecking for Glimmer templates",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"*.d.ts"
|
|
26
26
|
],
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@glimmer/component": "^
|
|
28
|
+
"@glimmer/component": "^2.0.0",
|
|
29
29
|
"expect-type": "^1.2.1",
|
|
30
30
|
"sums-up": "^2.1.0",
|
|
31
31
|
"ember-source": "^6.2.0",
|