@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.
package/dist/internals.js CHANGED
@@ -2116,10 +2116,7 @@ function resolveLiteralDiscriminatorPropertyValue(boundType, fieldName, checker,
2116
2116
  if (resolvedAnchorNode === null) {
2117
2117
  return void 0;
2118
2118
  }
2119
- const propertyType = checker.getTypeOfSymbolAtLocation(
2120
- propertySymbol,
2121
- resolvedAnchorNode
2122
- );
2119
+ const propertyType = checker.getTypeOfSymbolAtLocation(propertySymbol, resolvedAnchorNode);
2123
2120
  if (propertyType.isStringLiteral()) {
2124
2121
  return propertyType.value;
2125
2122
  }
@@ -3078,14 +3075,39 @@ function resolveObjectType(type, checker, file, typeRegistry, visiting, sourceNo
3078
3075
  collectedDiagnostics
3079
3076
  );
3080
3077
  const fieldNodeInfo = fieldInfoMap?.get(prop.name);
3078
+ const inlineFieldNodeInfo = fieldNodeInfo === void 0 ? ts3.isPropertySignature(declaration) ? analyzeInterfacePropertyToIR(
3079
+ declaration,
3080
+ checker,
3081
+ file,
3082
+ typeRegistry,
3083
+ visiting,
3084
+ collectedDiagnostics,
3085
+ type,
3086
+ metadataPolicy,
3087
+ extensionRegistry
3088
+ ) : ts3.isPropertyDeclaration(declaration) ? analyzeFieldToIR(
3089
+ declaration,
3090
+ checker,
3091
+ file,
3092
+ typeRegistry,
3093
+ visiting,
3094
+ collectedDiagnostics,
3095
+ type,
3096
+ metadataPolicy,
3097
+ extensionRegistry
3098
+ ) : null : null;
3099
+ const resolvedFieldNodeInfo = fieldNodeInfo ?? inlineFieldNodeInfo;
3100
+ const resolvedPropertyType = inlineFieldNodeInfo?.type ?? propTypeNode;
3081
3101
  properties.push({
3082
3102
  name: prop.name,
3083
- ...fieldNodeInfo?.metadata !== void 0 && { metadata: fieldNodeInfo.metadata },
3084
- type: propTypeNode,
3103
+ ...resolvedFieldNodeInfo?.metadata !== void 0 && {
3104
+ metadata: resolvedFieldNodeInfo.metadata
3105
+ },
3106
+ type: resolvedPropertyType,
3085
3107
  optional,
3086
- constraints: fieldNodeInfo?.constraints ?? [],
3087
- annotations: fieldNodeInfo?.annotations ?? [],
3088
- provenance: fieldNodeInfo?.provenance ?? provenanceForFile(file)
3108
+ constraints: resolvedFieldNodeInfo?.constraints ?? [],
3109
+ annotations: resolvedFieldNodeInfo?.annotations ?? [],
3110
+ provenance: resolvedFieldNodeInfo?.provenance ?? provenanceForFile(file)
3089
3111
  });
3090
3112
  }
3091
3113
  visiting.delete(type);