- 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:
@@ -388,7 +388,7 @@ export default {
|
||||
|
||||
/**
|
||||
* @param {"start"|"mid"|"end"} pos
|
||||
* @returns {Promise} Resolves to `undefined`
|
||||
* @returns {Promise<void>} Resolves to `undefined`
|
||||
*/
|
||||
async function showTextPrompt (pos) {
|
||||
let def = $('#' + pos + '_marker').val();
|
||||
@@ -426,7 +426,7 @@ export default {
|
||||
// callback function for a toolbar button click
|
||||
/**
|
||||
* @param {Event} ev
|
||||
* @returns {Promise} Resolves to `undefined`
|
||||
* @returns {Promise<void>} Resolves to `undefined`
|
||||
*/
|
||||
async function setArrowFromButton (ev) {
|
||||
const parts = this.id.split('_');
|
||||
|
||||
@@ -240,7 +240,7 @@ export default {
|
||||
}
|
||||
/**
|
||||
* @param {Event} ev
|
||||
* @returns {Promise} Resolves to `undefined`
|
||||
* @returns {Promise<void>} Resolves to `undefined`
|
||||
*/
|
||||
function setArrowFromButton (ev) {
|
||||
const parts = this.id.split('_');
|
||||
|
||||
Reference in New Issue
Block a user