- Enhancement: Return a Promise for Editor's setCustomHandlers,

`loadFromString`, `loadFromDataURI` so known when ready and set
- Docs (Refactoring): Formally specify `Promise` resolve type;
    add `typedef` for dialog result object; add an
    `ArbitraryCallbackResult` type
This commit is contained in:
Brett Zamir
2019-04-05 22:59:41 +08:00
parent 5abd183c43
commit 91c0dc549b
11 changed files with 83 additions and 52 deletions

View File

@@ -10,10 +10,16 @@
* @typedef {null|boolean|Float|string|GenericArray|PlainObject} JSON
*/
/**
* This should only be used when the return result from a callback
* is not known as to type.
* @typedef {*} ArbitraryCallbackResult
*/
/**
* @callback GenericCallback
* @param {...*} args Signature dependent on the function
* @returns {*} Return dependent on the function
* @returns {ArbitraryCallbackResult} Return dependent on the function
*/
/**