import {SupertypeSession} from '@havenlife/supertype'; type Constructable = new (...args: any[]) => BC; export class Persistor extends SupertypeSession { /** * @TODO: was typed `Persistor` but that's weird? doesn't work need to figure out what's going on. */ static create(): any | undefined {return undefined}; beginDefaultTransaction() : any {} /** * Creates A persistor transaction, and returns it */ beginTransaction() : any {} endTransaction(persistorTransaction?, logger?) : any {} /** * Begin a transaction that will ultimately be ended with end. It is passed into setDirty so * dirty objects can be accumulated. Does not actually start a knex transaction until end * * @param {bool} isDefault used for marking the transaction created as the default transaction * @returns {object} returns transaction object * @legacy use beginTransaction instead */ begin (isdefault?) : any {} /** * Ends a transaction * * @param persistorTransaction * @param logger * @legacy use commit instead * @async */ end (persistorTransaction?, logger?) : any {}; /** * Set the object dirty along with all descendant objects in the logical "document" * * @param {supertype} obj objecttempate * @param {object} txn persistobjecttemplate transaction object * @param {bool} onlyIfChanged mark dirty only if changed * @param {bool} noCascade, avoids loading children * @param {object} logger objecttemplate logger */ setDirty (obj, txn?, onlyIfChanged?, noCascade?, logger?) {}; /** * Called by