Helper class for creating a Promise that is paired with a single-value callback.
const pvc = new PromiseAndValueCallback<string>(); pvc.callback("a"); const result = await pvc.promise; // returns "a"
A callback function taking a single value; when it is called, promise is resolved with that value.
promise
A Promise that will be resolved when callback is called.
callback
Generated using TypeDoc
Helper class for creating a Promise that is paired with a single-value callback.