@formspec/build 0.1.0-alpha.31 → 0.1.0-alpha.32

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.
@@ -2142,10 +2142,7 @@ function resolveLiteralDiscriminatorPropertyValue(boundType, fieldName, checker,
2142
2142
  if (resolvedAnchorNode === null) {
2143
2143
  return void 0;
2144
2144
  }
2145
- const propertyType = checker.getTypeOfSymbolAtLocation(
2146
- propertySymbol,
2147
- resolvedAnchorNode
2148
- );
2145
+ const propertyType = checker.getTypeOfSymbolAtLocation(propertySymbol, resolvedAnchorNode);
2149
2146
  if (propertyType.isStringLiteral()) {
2150
2147
  return propertyType.value;
2151
2148
  }
@@ -3104,14 +3101,39 @@ function resolveObjectType(type, checker, file, typeRegistry, visiting, sourceNo
3104
3101
  collectedDiagnostics
3105
3102
  );
3106
3103
  const fieldNodeInfo = fieldInfoMap?.get(prop.name);
3104
+ const inlineFieldNodeInfo = fieldNodeInfo === void 0 ? ts3.isPropertySignature(declaration) ? analyzeInterfacePropertyToIR(
3105
+ declaration,
3106
+ checker,
3107
+ file,
3108
+ typeRegistry,
3109
+ visiting,
3110
+ collectedDiagnostics,
3111
+ type,
3112
+ metadataPolicy,
3113
+ extensionRegistry
3114
+ ) : ts3.isPropertyDeclaration(declaration) ? analyzeFieldToIR(
3115
+ declaration,
3116
+ checker,
3117
+ file,
3118
+ typeRegistry,
3119
+ visiting,
3120
+ collectedDiagnostics,
3121
+ type,
3122
+ metadataPolicy,
3123
+ extensionRegistry
3124
+ ) : null : null;
3125
+ const resolvedFieldNodeInfo = fieldNodeInfo ?? inlineFieldNodeInfo;
3126
+ const resolvedPropertyType = inlineFieldNodeInfo?.type ?? propTypeNode;
3107
3127
  properties.push({
3108
3128
  name: prop.name,
3109
- ...fieldNodeInfo?.metadata !== void 0 && { metadata: fieldNodeInfo.metadata },
3110
- type: propTypeNode,
3129
+ ...resolvedFieldNodeInfo?.metadata !== void 0 && {
3130
+ metadata: resolvedFieldNodeInfo.metadata
3131
+ },
3132
+ type: resolvedPropertyType,
3111
3133
  optional,
3112
- constraints: fieldNodeInfo?.constraints ?? [],
3113
- annotations: fieldNodeInfo?.annotations ?? [],
3114
- provenance: fieldNodeInfo?.provenance ?? provenanceForFile(file)
3134
+ constraints: resolvedFieldNodeInfo?.constraints ?? [],
3135
+ annotations: resolvedFieldNodeInfo?.annotations ?? [],
3136
+ provenance: resolvedFieldNodeInfo?.provenance ?? provenanceForFile(file)
3115
3137
  });
3116
3138
  }
3117
3139
  visiting.delete(type);