@glint/template 1.6.0-alpha.1 → 1.6.0-alpha.3

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.
@@ -585,6 +585,10 @@ interface HTMLTextAreaElementAttributes extends GenericAttributes {
585
585
  ['readonly']: AttrValue;
586
586
  ['required']: AttrValue;
587
587
  ['rows']: AttrValue;
588
+ // This is not actually an HTMLTextAreaElement attribute, but Ember/Glimmer
589
+ // support `value` attribute syntax to support binding values into
590
+ // `<textarea>`s, so we include it here.
591
+ ['value']: AttrValue;
588
592
  ['wrap']: AttrValue;
589
593
  }
590
594
  interface HTMLTimeElementAttributes extends GenericAttributes {
@@ -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 keyof HTMLElementTagNameMap | 'math' | 'svg'>(
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 = Symbol();
5
+ export const GlintSymbol: unique symbol;
6
6
 
7
7
  declare global {
8
8
 
@@ -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.0-alpha.1",
3
+ "version": "1.6.0-alpha.3",
4
4
  "repository": "typed-ember/glint",
5
5
  "description": "Type definitions to back typechecking for Glimmer templates",
6
6
  "license": "MIT",
@@ -20,7 +20,7 @@
20
20
  "*.d.ts"
21
21
  ],
22
22
  "devDependencies": {
23
- "@glimmer/component": "^1.1.2",
23
+ "@glimmer/component": "^2.0.0",
24
24
  "expect-type": "^1.2.1",
25
25
  "sums-up": "^2.1.0",
26
26
  "ember-source": "^6.2.0",