UNPKG

effect-sql-kysely

Version:

A full-featured integration between `@effect/sql` and `Kysely` that provides type-safe database operations with Effect's powerful error handling and resource management.

30 lines (29 loc) 701 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DeferredPromise = void 0; // Helper for creating a deferred promise class DeferredPromise { _promise; _resolve; _reject; constructor() { this._promise = new Promise((resolve, reject) => { this._reject = reject; this._resolve = resolve; }); } get promise() { return this._promise; } resolve = (value) => { if (this._resolve) { this._resolve(value); } }; reject = (reason) => { if (this._reject) { this._reject(reason); } }; } exports.DeferredPromise = DeferredPromise;