UNPKG

@graphql-tools/utils

Version:

Common package containing utils and types for GraphQL tools

16 lines (15 loc) 420 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createDeferred = createDeferred; function createDeferred() { if (Promise.withResolvers) { return Promise.withResolvers(); } let resolve; let reject; const promise = new Promise((_resolve, _reject) => { resolve = _resolve; reject = _reject; }); return { promise, resolve, reject }; }