LensStudio:GeneralUtils.js.promisify
FunctionConverts a callback-based function to a Promise-based function.
promisify<
T>(fn):Promise<T>
Converts a callback-based function to a Promise-based function.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type | Description |
|---|---|---|
fn | (callback) => void | The callback-based function to convert. |
Returns
Promise<T>
A Promise-based version of the function.