@doeixd/machine 0.0.20 → 0.0.22

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/README.md CHANGED
@@ -807,6 +807,25 @@ const alice = buildUser({ id: 1, name: "Alice" });
807
807
  const bob = buildUser({ id: 2, name: "Bob" });
808
808
  ```
809
809
 
810
+ #### `MachineUnion(...classes)`
811
+
812
+ Combines multiple `MachineBase` classes into a single class with merged context and methods. Provides true multiple inheritance for state machines.
813
+
814
+ ```typescript
815
+ class Combined extends MachineUnion(Machine1, Machine2) {}
816
+ // Or use instances: const combined = machineUnion(inst1, inst2);
817
+ ```
818
+
819
+ #### `MachineExclude(Source, Excluded)`
820
+
821
+ Creates a new machine class by excluding methods from a source machine.
822
+
823
+ ```typescript
824
+ // Create a machine that has all Source features EXCEPT those in Excluded
825
+ class Restricted extends MachineExclude(Source, Excluded) {}
826
+ // Or use instances: const restricted = machineExclude(sourceInst, excludedInst);
827
+ ```
828
+
810
829
  ### Middleware System
811
830
 
812
831
  For production-ready state machines with logging, analytics, validation, error handling, and debugging capabilities: