Moved the JSdoc for invokeGuardedCallback to correct position (#9337)

This commit is contained in:
Rahul Gupta
2017-04-05 12:34:14 +01:00
committed by Dan Abramov
parent 9fd5723fe8
commit e12ea72acd
@@ -76,15 +76,6 @@ let rethrowCaughtError = function() {
}
};
/**
* Call a function while guarding against errors that happens within it.
* Returns an error if it throws, otherwise null.
*
* @param {String} name of the guard to use for logging or debugging
* @param {Function} func The function to invoke
* @param {*} context The context to use when calling the function
* @param {...*} args Arguments for function
*/
const ReactErrorUtils = {
injection: {
injectErrorUtils(injectedErrorUtils: Object) {
@@ -96,6 +87,15 @@ const ReactErrorUtils = {
},
},
/**
* Call a function while guarding against errors that happens within it.
* Returns an error if it throws, otherwise null.
*
* @param {String} name of the guard to use for logging or debugging
* @param {Function} func The function to invoke
* @param {*} context The context to use when calling the function
* @param {...*} args Arguments for function
*/
invokeGuardedCallback: function<A, B, C, D, E, F, Context>(
name: string | null,
func: (a: A, b: B, c: C, d: D, e: E, f: F) => void,