@formspec/build 0.1.0-alpha.53 → 0.1.0-alpha.54

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
@@ -2932,10 +2932,22 @@ function resolveTypeNode(type, checker, file, typeRegistry, visiting, sourceNode
2932
2932
  sourceNode
2933
2933
  );
2934
2934
  if (customTypeLookup !== null) {
2935
+ const typeId = customTypeIdFromLookup(customTypeLookup);
2936
+ let payload = null;
2937
+ if (customTypeLookup.registration.extractPayload !== void 0) {
2938
+ try {
2939
+ payload = customTypeLookup.registration.extractPayload(type, checker) ?? null;
2940
+ } catch (cause) {
2941
+ throw new Error(
2942
+ `extractPayload for custom type "${customTypeLookup.registration.typeName}" in extension "${customTypeLookup.extensionId}" threw`,
2943
+ { cause }
2944
+ );
2945
+ }
2946
+ }
2935
2947
  return {
2936
2948
  kind: "custom",
2937
- typeId: customTypeIdFromLookup(customTypeLookup),
2938
- payload: null
2949
+ typeId,
2950
+ payload
2939
2951
  };
2940
2952
  }
2941
2953
  const primitiveAlias = tryResolveNamedPrimitiveAlias(