@typespec/compiler 1.7.0-dev.1 → 1.7.0-dev.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.
package/dist/manifest.js CHANGED
@@ -1,4 +1,4 @@
1
1
  export default {
2
- "version": "1.7.0-dev.1",
3
- "commit": "dc7045f1caf27a58a13023a1f3ca725596b64d7f"
2
+ "version": "1.7.0-dev.3",
3
+ "commit": "b5719ee0e8954584125a631e1cf4010e1299aa26"
4
4
  };
@@ -1333,8 +1333,8 @@ export function createChecker(program, resolver) {
1333
1333
  }
1334
1334
  }
1335
1335
  }
1336
- for (const [_, option] of modelOptions) {
1337
- intersection.sourceModels.push({ usage: "intersection", model: option });
1336
+ for (const [optionNode, option] of modelOptions) {
1337
+ intersection.sourceModels.push({ usage: "intersection", model: option, node: optionNode });
1338
1338
  const allProps = walkPropertiesInherited(option);
1339
1339
  for (const prop of allProps) {
1340
1340
  if (properties.has(prop.name)) {
@@ -2598,7 +2598,7 @@ export function createChecker(program, resolver) {
2598
2598
  ], type, () => {
2599
2599
  if (isBase) {
2600
2600
  type.sourceModel = isBase;
2601
- type.sourceModels.push({ usage: "is", model: isBase });
2601
+ type.sourceModels.push({ usage: "is", model: isBase, node: node.is });
2602
2602
  decorators.push(...isBase.decorators);
2603
2603
  if (isBase.indexer) {
2604
2604
  type.indexer = isBase.indexer;
@@ -3428,7 +3428,7 @@ export function createChecker(program, resolver) {
3428
3428
  reportCheckerDiagnostic(createDiagnostic({ code: "spread-model", target: targetNode }), mapper);
3429
3429
  return [[], undefined];
3430
3430
  }
3431
- parentModel.sourceModels.push({ usage: "spread", model: targetType });
3431
+ parentModel.sourceModels.push({ usage: "spread", model: targetType, node: targetNode });
3432
3432
  const props = [];
3433
3433
  // copy each property
3434
3434
  for (const prop of walkPropertiesInherited(targetType)) {