effect 4.0.0-beta.91 → 4.0.0-beta.92

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/Schema.js CHANGED
@@ -7469,19 +7469,22 @@ export const DateTimeZoned = /*#__PURE__*/declare(u => DateTime.isDateTime(u) &&
7469
7469
  */
7470
7470
  export const DateTimeZonedFromString = /*#__PURE__*/DateTimeZonedString.pipe(/*#__PURE__*/decodeTo(DateTimeZoned, SchemaTransformation.dateTimeZonedFromString));
7471
7471
  const immerable = /*#__PURE__*/globalThis.Symbol.for("immer-draftable");
7472
+ const payloadToken = {};
7472
7473
  function makeClass(Inherited, identifier, struct, annotations, proto) {
7473
7474
  const getClassSchema = getClassSchemaFactory(struct, identifier, annotations);
7474
7475
  const ClassTypeId = getClassTypeId(identifier); // HMR support
7475
7476
  const out = class extends Inherited {
7476
7477
  constructor(...[input, options]) {
7477
- input = input ?? {};
7478
- const validated = struct.make(input, options);
7479
- super({
7480
- ...input,
7481
- ...validated
7482
- }, {
7478
+ const internalOptions = options;
7479
+ const payload = internalOptions?.["~payload"];
7480
+ const value = payload?.token === payloadToken ? payload.value : struct.make(input ?? {}, options);
7481
+ super(value, {
7483
7482
  ...options,
7484
- disableChecks: true
7483
+ disableChecks: true,
7484
+ "~payload": {
7485
+ token: payloadToken,
7486
+ value
7487
+ }
7485
7488
  });
7486
7489
  }
7487
7490
  static [TypeId] = TypeId;