@typespec/emitter-framework 0.7.0-dev.2 → 0.7.0-dev.4

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.
@@ -74,16 +74,16 @@ function getExtendsType($, type) {
74
74
  extending.push(getRefkey(type.baseModel));
75
75
  }
76
76
  }
77
- const spreadType = $.model.getSpreadType(type);
78
- if (spreadType) {
77
+ const indexType = $.model.getIndexType(type);
78
+ if (indexType) {
79
79
  // When extending a record we need to override the element type to be unknown to avoid type errors
80
- if ($.record.is(spreadType)) {
80
+ if ($.record.is(indexType)) {
81
81
  // Here we are in the additional properties land.
82
82
  // Instead of extending we need to create an envelope property
83
83
  // do nothing here.
84
84
  } else {
85
85
  extending.push(_$createComponent(TypeExpression, {
86
- type: spreadType
86
+ type: indexType
87
87
  }));
88
88
  }
89
89
  }
@@ -170,7 +170,7 @@ export function ModelTransformExpression(props) {
170
170
  target: props.type
171
171
  });
172
172
  }
173
- if ($.model.getSpreadType(props.type)) {
173
+ if ($.model.getIndexType(props.type)) {
174
174
  reportTypescriptDiagnostic($.program, {
175
175
  code: "typescript-spread-model-transformation-nyi",
176
176
  target: props.type
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typespec/emitter-framework",
3
- "version": "0.7.0-dev.2",
3
+ "version": "0.7.0-dev.4",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
@@ -19,17 +19,17 @@
19
19
  "license": "MIT",
20
20
  "description": "",
21
21
  "peerDependencies": {
22
- "@alloy-js/core": "^0.11.0",
23
- "@alloy-js/typescript": "^0.11.0",
22
+ "@alloy-js/core": "^0.13.0",
23
+ "@alloy-js/typescript": "^0.13.0",
24
24
  "@typespec/compiler": "^1.0.0-rc.1",
25
25
  "@typespec/http": "^1.0.0-rc.1",
26
26
  "@typespec/rest": "^0.69.0 || >=0.70.0-dev <0.70.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@alloy-js/cli": "^0.11.0",
29
+ "@alloy-js/cli": "^0.13.0",
30
30
  "@alloy-js/rollup-plugin": "^0.1.0",
31
- "@alloy-js/core": "^0.11.0",
32
- "@alloy-js/typescript": "^0.11.0",
31
+ "@alloy-js/core": "^0.13.0",
32
+ "@alloy-js/typescript": "^0.13.0",
33
33
  "@types/minimist": "^1.2.5",
34
34
  "@typespec/compiler": "^1.0.0-rc.1",
35
35
  "@typespec/http": "^1.0.0-rc.1",
@@ -96,15 +96,15 @@ function getExtendsType($: Typekit, type: Model | Interface): Children | undefin
96
96
  }
97
97
  }
98
98
 
99
- const spreadType = $.model.getSpreadType(type);
100
- if (spreadType) {
99
+ const indexType = $.model.getIndexType(type);
100
+ if (indexType) {
101
101
  // When extending a record we need to override the element type to be unknown to avoid type errors
102
- if ($.record.is(spreadType)) {
102
+ if ($.record.is(indexType)) {
103
103
  // Here we are in the additional properties land.
104
104
  // Instead of extending we need to create an envelope property
105
105
  // do nothing here.
106
106
  } else {
107
- extending.push(<TypeExpression type={spreadType} />);
107
+ extending.push(<TypeExpression type={indexType} />);
108
108
  }
109
109
  }
110
110
 
@@ -198,7 +198,7 @@ export function ModelTransformExpression(props: ModelTransformExpressionProps) {
198
198
  });
199
199
  }
200
200
 
201
- if ($.model.getSpreadType(props.type)) {
201
+ if ($.model.getIndexType(props.type)) {
202
202
  reportTypescriptDiagnostic($.program, {
203
203
  code: "typescript-spread-model-transformation-nyi",
204
204
  target: props.type,