@glint/template 0.7.5 → 0.8.0

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.
@@ -6,7 +6,7 @@ import {
6
6
  FlattenBlockParams,
7
7
  Invokable,
8
8
  } from './integration';
9
- import { ExpandSignature } from '@glimmer/component/dist/types/addon/-private/component';
9
+ import { ExpandSignature } from '@glimmer/component/-private/component';
10
10
 
11
11
  /**
12
12
  * A value that is invokable like a component in a template. In an
@@ -53,16 +53,10 @@ export type TemplateContext<This, Args, Yields, Element> = {
53
53
  element: Element;
54
54
  };
55
55
 
56
- // This is a workaround for the fact that @glimmer/component initially shipped
57
- // with a bug that causes blocks to expand as `{ default: { Positional: [] } }` rather
58
- // thatn `{ default: { Params: { Positional: [] } } }`. Once a fix is released,
59
- // we can require at least that version starting in Glint 0.8 and drop this wrapper.
60
- type MaybeBlockParams<T> = T | { Params: T };
61
-
62
56
  /**
63
57
  * Flattens the fully expanded signature format for Blocks down to a mapping from
64
58
  * each block name to a corresponding tuple of parameter types.
65
59
  */
66
60
  export type FlattenBlockParams<T> = {
67
- [K in keyof T]: T[K] extends MaybeBlockParams<{ Positional: infer U }> ? U : T[K];
61
+ [K in keyof T]: T[K] extends { Params: { Positional: infer U } } ? U : T[K];
68
62
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glint/template",
3
- "version": "0.7.5",
3
+ "version": "0.8.0",
4
4
  "repository": "typed-ember/glint",
5
5
  "description": "Type definitions to back typechecking for Glimmer templates",
6
6
  "license": "MIT",
@@ -15,10 +15,13 @@
15
15
  "-private",
16
16
  "*.d.ts"
17
17
  ],
18
+ "peerDependencies": {
19
+ "@glimmer/component": "^1.1.2"
20
+ },
18
21
  "devDependencies": {
19
- "@glimmer/component": "^1.1.0",
22
+ "@glimmer/component": "^1.1.2",
20
23
  "@glimmerx/component": "^0.4.2",
21
- "@types/ember__component": "~4.0.0",
24
+ "@types/ember__component": "~4.0.8",
22
25
  "expect-type": "0.11.0",
23
26
  "sums-up": "^2.1.0"
24
27
  },