@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/cli.js CHANGED
@@ -4441,10 +4441,22 @@ function resolveTypeNode(type, checker, file, typeRegistry, visiting, sourceNode
4441
4441
  sourceNode
4442
4442
  );
4443
4443
  if (customTypeLookup !== null) {
4444
+ const typeId = customTypeIdFromLookup(customTypeLookup);
4445
+ let payload = null;
4446
+ if (customTypeLookup.registration.extractPayload !== void 0) {
4447
+ try {
4448
+ payload = customTypeLookup.registration.extractPayload(type, checker) ?? null;
4449
+ } catch (cause) {
4450
+ throw new Error(
4451
+ `extractPayload for custom type "${customTypeLookup.registration.typeName}" in extension "${customTypeLookup.extensionId}" threw`,
4452
+ { cause }
4453
+ );
4454
+ }
4455
+ }
4444
4456
  return {
4445
4457
  kind: "custom",
4446
- typeId: customTypeIdFromLookup(customTypeLookup),
4447
- payload: null
4458
+ typeId,
4459
+ payload
4448
4460
  };
4449
4461
  }
4450
4462
  const primitiveAlias = tryResolveNamedPrimitiveAlias(