@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/index.cjs CHANGED
@@ -4356,10 +4356,22 @@ function resolveTypeNode(type, checker, file, typeRegistry, visiting, sourceNode
4356
4356
  sourceNode
4357
4357
  );
4358
4358
  if (customTypeLookup !== null) {
4359
+ const typeId = customTypeIdFromLookup(customTypeLookup);
4360
+ let payload = null;
4361
+ if (customTypeLookup.registration.extractPayload !== void 0) {
4362
+ try {
4363
+ payload = customTypeLookup.registration.extractPayload(type, checker) ?? null;
4364
+ } catch (cause) {
4365
+ throw new Error(
4366
+ `extractPayload for custom type "${customTypeLookup.registration.typeName}" in extension "${customTypeLookup.extensionId}" threw`,
4367
+ { cause }
4368
+ );
4369
+ }
4370
+ }
4359
4371
  return {
4360
4372
  kind: "custom",
4361
- typeId: customTypeIdFromLookup(customTypeLookup),
4362
- payload: null
4373
+ typeId,
4374
+ payload
4363
4375
  };
4364
4376
  }
4365
4377
  const primitiveAlias = tryResolveNamedPrimitiveAlias(