Skip to content

Commit

Permalink
[FIX] sap.ui.core: adapt return types to textual description
Browse files Browse the repository at this point in the history
Change-Id: I82d92565b49ac49a4e271a5945a2cadb73475eb4
  • Loading branch information
codeworrior committed Jul 25, 2022
1 parent 58df449 commit 78e6c31
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
20 changes: 10 additions & 10 deletions src/sap.ui.core/src/sap/ui/core/mvc/Controller.js
Expand Up @@ -652,8 +652,8 @@ sap.ui.define([
};

/**
* Returns the view associated with this controller or undefined.
* @return {sap.ui.core.mvc.View} View connected to this controller.
* Returns the view associated with this controller or <code>undefined</code>.
* @returns {sap.ui.core.mvc.View|undefined} View connected to this controller.
* @public
*/
Controller.prototype.getView = function() {
Expand All @@ -668,10 +668,10 @@ sap.ui.define([
* This method helps to find an element by its local ID only.
*
* If no view is connected or if the view doesn't contain an element with
* the given local ID, undefined is returned.
* the given local ID, <code>undefined</code> is returned.
*
* @param {string} sId View-local ID
* @return {sap.ui.core.Element} Element by its (view local) ID
* @returns {sap.ui.core.Element|undefined} Element by its (view local) ID
* @public
*/
Controller.prototype.byId = function(sId) {
Expand All @@ -683,10 +683,10 @@ sap.ui.define([
* Converts a view local ID to a globally unique one by prepending
* the view ID.
*
* If no view is connected, undefined is returned.
* If no view is connected, <code>undefined</code> is returned.
*
* @param {string} sId View-local ID
* @return {string} Prefixed ID
* @returns {string|undefined} Prefixed ID
* @public
*/
Controller.prototype.createId = function(sId) {
Expand All @@ -697,9 +697,9 @@ sap.ui.define([
* Gets the component of the controller's view
*
* If there is no Component connected to the view or the view is not connected to the controller,
* undefined is returned.
* <code>undefined</code> is returned.
*
* @return {sap.ui.core.Component} Component instance
* @return {sap.ui.core.Component|undefined} Component instance
* @since 1.23.0
* @public
*/
Expand Down Expand Up @@ -785,7 +785,7 @@ sap.ui.define([
* @param {boolean} [mOptions.autoPrefixId=true] Whether the IDs of the fragment content will be prefixed by the view ID
* @param {string} [mOptions.id] the ID of the Fragment
* @param {string} [mOptions.type=XML] the Fragment type, e.g. "XML", "JS", or "HTML" (see above). Default is "XML"
* @return {Promise} A Promise that resolves with the fragment content
* @returns {Promise<sap.ui.core.Control|sap.ui.core.Control[]>} A Promise that resolves with the fragment content
*
* @since 1.93
* @public
Expand Down Expand Up @@ -921,7 +921,7 @@ sap.ui.define([
* controller. The event handler functions, such as <code>onButtonClick</code>,
* are replacing the original controller's function.
*
* When using an async extension provider you need to ensure that the
* When using an async extension provider, you need to ensure that the
* view is loaded in async mode.
*
* In both cases, return <code>undefined</code> if no controller extension shall be applied.
Expand Down
12 changes: 6 additions & 6 deletions src/sap.ui.core/src/sap/ui/core/mvc/View.js
Expand Up @@ -661,7 +661,7 @@ sap.ui.define([
* you should rather use {@link sap.ui.core.Core#byId sap.ui.getCore().byId()}.
*
* @param {string} sId View local ID of the element
* @return {sap.ui.core.Element} Element by its ID or <code>undefined</code>
* @return {sap.ui.core.Element|undefined} Element by its ID or <code>undefined</code>
* @public
*/
View.prototype.byId = function(sId) {
Expand All @@ -673,7 +673,7 @@ sap.ui.define([
* by prefixing it with the view ID.
*
* @param {string} sId View local ID of the element
* @return {string} prefixed id
* @returns {string} prefixed id
* @public
*/
View.prototype.createId = function(sId) {
Expand All @@ -689,7 +689,7 @@ sap.ui.define([
* <code>null</code> if the ID does not contain a prefix.
*
* @param {string} sId Prefixed ID
* @return {string} ID without prefix or <code>null</code>
* @returns {string|null} ID without prefix or <code>null</code>
* @public
* @since 1.39.0
*/
Expand All @@ -702,16 +702,16 @@ sap.ui.define([
* Checks whether the given ID already contains this view's ID prefix
*
* @param {string} sId ID that is checked for the prefix
* @return {boolean} whether the ID is already prefixed
* @returns {boolean} Whether the ID is already prefixed
*/
View.prototype.isPrefixedId = function(sId) {
return !!(sId && sId.indexOf(this.getId() + "--") === 0);
};

/**
* Returns user specific data object
* Returns user specific data object.
*
* @return {object} viewData
* @returns {object} viewData
* @public
*/
View.prototype.getViewData = function() {
Expand Down
6 changes: 3 additions & 3 deletions src/sap.ui.core/src/sap/ui/core/routing/Router.js
Expand Up @@ -692,7 +692,7 @@ sap.ui.define([
* Returns the route with the given name or <code>undefined</code> if no route is found.
*
* @param {string} sName Name of the route
* @returns {sap.ui.core.routing.Route} Route with the provided name or <code>undefined</code>.
* @returns {sap.ui.core.routing.Route|undefined} Route with the provided name or <code>undefined</code>.
* @public
* @since 1.25.1
*/
Expand Down Expand Up @@ -884,9 +884,9 @@ sap.ui.define([

/**
* Returns the name of the last matched route.
* If there's no route matched before, it returns undefined
* If there's no route matched before, it returns <code>undefined</code>
*
* @returns {string} The name of the last matched route
* @returns {string|undefined} The name of the last matched route
*/
_getLastMatchedRouteName: function() {
return this._oMatchedRoute && this._oMatchedRoute._oConfig.name;
Expand Down

0 comments on commit 78e6c31

Please sign in to comment.