1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-10 09:22:25 +03:00

fix lint, add jsdoc

This commit is contained in:
Bruno Windels
2020-02-06 15:29:35 +01:00
parent cf7ad725a6
commit a8958458aa

View File

@@ -170,6 +170,12 @@ class ModalManager {
}, deferred.promise]; }, deferred.promise];
} }
/**
* @callback onBeforeClose
* @param {string?} reason either "backgroundClick" or null
* @return {Promise<bool>} whether the dialog should close
*/
/** /**
* Open a modal view. * Open a modal view.
* *
@@ -197,6 +203,8 @@ class ModalManager {
* also be removed from the stack. This is not compatible * also be removed from the stack. This is not compatible
* with being a priority modal. Only one modal can be * with being a priority modal. Only one modal can be
* static at a time. * static at a time.
* @param {Object} options? extra options for the dialog
* @param {onBeforeClose} options.onBeforeClose a callback to decide whether to close the dialog
* @returns {object} Object with 'close' parameter being a function that will close the dialog * @returns {object} Object with 'close' parameter being a function that will close the dialog
*/ */
createDialogAsync(prom, props, className, isPriorityModal, isStaticModal, options = {}) { createDialogAsync(prom, props, className, isPriorityModal, isStaticModal, options = {}) {