JSPM

@rbxts/transact

1.0.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q29117F
  • License MIT

Package Exports

  • @rbxts/transact
  • @rbxts/transact/out/init.lua

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@rbxts/transact) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

🤝 Transaction 🤝

Transaction will allow you to conduct secure transactions using Transact, Rollback methods.

Example

A code snippet showing how to set up and use Transaction.

class TestEntity implements ITransactEntity {
    public Init() {
        print("Init");
    }
    
    public async Transact() {
        print("Manipulating the data");
        print("Data saving");
    }

    public async Rollback() {
        print("Here you can roll back the data to its original state");
    }

    public End() {
        print("End");
    }
}

const transaction = new Transaction([new TestEntity(), new TestEntity()]);
const transact = transaction.Transact().expect();
print(transact.StatusCodes);