Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
Add non-nullable modifier to return type of functions never returning…
Browse files Browse the repository at this point in the history
… null.

RELNOTES[INC]: Add non-nullable modifier to return type of functions never returning null.

PiperOrigin-RevId: 300768467
  • Loading branch information
vrana authored and 12wrigja committed Mar 13, 2020
1 parent 60f4a9c commit f4c4443
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion closure/goog/ui/colormenubuttonrenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ goog.ui.ColorMenuButtonRenderer.CSS_CLASS =
* background.
* @param {goog.ui.ControlContent} content Text caption or DOM structure.
* @param {goog.dom.DomHelper} dom DOM helper, used for document interaction.
* @return {Element} Caption element.
* @return {!Element} Caption element.
* @override
*/
goog.ui.ColorMenuButtonRenderer.prototype.createCaption = function(
Expand Down
2 changes: 1 addition & 1 deletion closure/goog/ui/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@ goog.ui.Component.prototype.indexOfChild = function(child) {
* or the child component itself.
* @param {boolean=} opt_unrender If true, calls `exitDocument` on the
* removed child component, and detaches its DOM from the document.
* @return {goog.ui.Component} The removed component, if any.
* @return {?goog.ui.Component} The removed component, if any.
*/
goog.ui.Component.prototype.removeChild = function(child, opt_unrender) {
if (child) {
Expand Down
2 changes: 1 addition & 1 deletion closure/goog/ui/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ goog.ui.Container.prototype.updateHighlightedIndex_ = function(
* @param {boolean=} opt_unrender Whether to call `exitDocument` on the
* removed control, and detach its DOM from the document (defaults to
* false).
* @return {goog.ui.Control} The removed control, if any.
* @return {?goog.ui.Control} The removed control, if any.
* @override
*/
goog.ui.Container.prototype.removeChild = function(control, opt_unrender) {
Expand Down
2 changes: 1 addition & 1 deletion closure/goog/ui/controlrenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ goog.ui.ControlRenderer.prototype.getCssClass = function() {
* method doesn't reference {@link IE6_CLASS_COMBINATIONS} so that it can be
* compiled out, but subclasses should return their IE6_CLASS_COMBINATIONS
* static constant instead.
* @return {Array<Array<string>>} Array of class name combinations.
* @return {!Array<Array<string>>} Array of class name combinations.
*/
goog.ui.ControlRenderer.prototype.getIe6ClassCombinations = function() {
return [];
Expand Down
2 changes: 1 addition & 1 deletion closure/goog/ui/flatmenubuttonrenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ goog.ui.FlatMenuButtonRenderer.prototype.decorate = function(button, element) {
* @param {goog.ui.ControlContent} content Text caption or DOM structure to wrap
* in a box.
* @param {goog.dom.DomHelper} dom DOM helper, used for document interaction.
* @return {Element} Caption element.
* @return {!Element} Caption element.
*/
goog.ui.FlatMenuButtonRenderer.prototype.createCaption = function(
content, dom) {
Expand Down
4 changes: 2 additions & 2 deletions closure/goog/ui/keyboardshortcuthandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ goog.ui.KeyboardShortcutHandler.unsetShortcut_ = function(tree, strokes) {
* @param {!goog.ui.KeyboardShortcutHandler.SequenceTree_} tree The
* stroke sequence tree to find the node in.
* @param {Array<string>} stroke Stroke to find.
* @return {goog.ui.KeyboardShortcutHandler.SequenceNode_|undefined} Node matching stroke.
* @return {!goog.ui.KeyboardShortcutHandler.SequenceNode_|undefined} Node matching stroke.
* @private
*/
goog.ui.KeyboardShortcutHandler.prototype.getNode_ = function(tree, stroke) {
Expand Down Expand Up @@ -1016,7 +1016,7 @@ goog.ui.KeyboardShortcutHandler.prototype.checkShortcut_ = function(
* @param {string} keyName Key name.
* @param {number} keyCode Numeric key code.
* @param {number} modifiers Required modifiers.
* @return {Array<string>} An array of strings identifying the key/modifier
* @return {!Array<string>} An array of strings identifying the key/modifier
* combinations.
* @private
*/
Expand Down
4 changes: 2 additions & 2 deletions closure/goog/ui/menubuttonrenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ goog.ui.MenuButtonRenderer.prototype.createButton = function(content, dom) {
* @param {goog.ui.ControlContent} content Text caption or DOM structure
* to wrap in a box.
* @param {goog.dom.DomHelper} dom DOM helper, used for document interaction.
* @return {Element} Caption element.
* @return {!Element} Caption element.
*/
goog.ui.MenuButtonRenderer.prototype.createCaption = function(content, dom) {
return goog.ui.MenuButtonRenderer.wrapCaption(
Expand Down Expand Up @@ -177,7 +177,7 @@ goog.ui.MenuButtonRenderer.wrapCaption = function(content, cssClass, dom) {
* </div>
*
* @param {goog.dom.DomHelper} dom DOM helper, used for document interaction.
* @return {Element} Dropdown element.
* @return {!Element} Dropdown element.
*/
goog.ui.MenuButtonRenderer.prototype.createDropdown = function(dom) {
// 00A0 is &nbsp;
Expand Down
4 changes: 2 additions & 2 deletions closure/goog/ui/menuitemrenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ goog.ui.MenuItemRenderer.prototype.getAriaRole = function() {
* Overrides {@link goog.ui.ControlRenderer#createDom} by adding extra markup
* and stying to the menu item's element if it is selectable or checkable.
* @param {goog.ui.Control} item Menu item to render.
* @return {Element} Root element for the item.
* @return {!Element} Root element for the item.
* @override
*/
goog.ui.MenuItemRenderer.prototype.createDom = function(item) {
Expand Down Expand Up @@ -203,7 +203,7 @@ goog.ui.MenuItemRenderer.prototype.hasContentStructure = function(element) {
* containing the menu item's contents.
* @param {goog.ui.ControlContent} content Menu item contents.
* @param {goog.dom.DomHelper} dom DOM helper for document interaction.
* @return {Element} Menu item content element.
* @return {!Element} Menu item content element.
* @protected
*/
goog.ui.MenuItemRenderer.prototype.createContent = function(content, dom) {
Expand Down
3 changes: 2 additions & 1 deletion closure/goog/ui/nativebuttonrenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ goog.ui.NativeButtonRenderer.prototype.getAriaRole = function() {
* Returns the button's contents wrapped in a native HTML button element. Sets
* the button's disabled attribute as needed.
* @param {goog.ui.Control} button Button to render.
* @return {Element} Root element for the button (a native HTML button element).
* @return {!Element} Root element for the button (a native HTML button
* element).
* @override
*/
goog.ui.NativeButtonRenderer.prototype.createDom = function(button) {
Expand Down
2 changes: 1 addition & 1 deletion closure/goog/ui/progressbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ goog.ui.ProgressBar.prototype.exitDocument = function() {
/**
* This creates the thumb element.
* @private
* @return {HTMLDivElement} The created thumb element.
* @return {!HTMLDivElement} The created thumb element.
*/
goog.ui.ProgressBar.prototype.createThumb_ = function() {
return this.getDomHelper().createDom(
Expand Down
2 changes: 1 addition & 1 deletion closure/goog/ui/splitpane.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ goog.ui.SplitPane.prototype.canDecorate = function(element) {
* @param {Element} rootElement The root element from which to retrieve the
* element to be decorated.
* @param {string} className The target class name.
* @return {Element} The element to decorate.
* @return {!Element} The element to decorate.
* @private
*/
goog.ui.SplitPane.prototype.getElementToDecorate_ = function(
Expand Down
2 changes: 1 addition & 1 deletion closure/goog/ui/style/app/buttonrenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ goog.ui.style.app.ButtonRenderer.CSS_CLASS = goog.getCssName('goog-button');
* Array of arrays of CSS classes that we want composite classes added and
* removed for in IE6 and lower as a workaround for lack of multi-class CSS
* selector support.
* @type {Array<Array<string>>}
* @type {!Array<Array<string>>}
*/
goog.ui.style.app.ButtonRenderer.IE6_CLASS_COMBINATIONS = [];

Expand Down
2 changes: 1 addition & 1 deletion closure/goog/ui/style/app/menubuttonrenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ goog.ui.style.app.MenuButtonRenderer.CSS_CLASS =
* Array of arrays of CSS classes that we want composite classes added and
* removed for in IE6 and lower as a workaround for lack of multi-class CSS
* selector support.
* @type {Array<Array<string>>}
* @type {!Array<Array<string>>}
*/
goog.ui.style.app.MenuButtonRenderer.IE6_CLASS_COMBINATIONS = [
[
Expand Down
2 changes: 1 addition & 1 deletion closure/goog/ui/style/app/primaryactionbuttonrenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ goog.ui.style.app.PrimaryActionButtonRenderer.CSS_CLASS =
* Array of arrays of CSS classes that we want composite classes added and
* removed for in IE6 and lower as a workaround for lack of multi-class CSS
* selector support.
* @type {Array<Array<string>>}
* @type {!Array<Array<string>>}
*/
goog.ui.style.app.PrimaryActionButtonRenderer.IE6_CLASS_COMBINATIONS = [
['goog-button-base-disabled', 'goog-primaryactionbutton'],
Expand Down
2 changes: 1 addition & 1 deletion closure/goog/ui/tabbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ goog.ui.TabBar.prototype.disposeInternal = function() {
* @param {string|goog.ui.Component} tab Tab to remove.
* @param {boolean=} opt_unrender Whether to call `exitDocument` on the
* removed tab, and detach its DOM from the document (defaults to false).
* @return {goog.ui.Control} The removed tab, if any.
* @return {?goog.ui.Control} The removed tab, if any.
* @override
*/
goog.ui.TabBar.prototype.removeChild = function(tab, opt_unrender) {
Expand Down
2 changes: 1 addition & 1 deletion closure/goog/ui/zippy.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ goog.ui.Zippy.prototype.getAriaRole = function() {


/**
* @return {HTMLElement} The content element.
* @return {!HTMLElement} The content element.
*/
goog.ui.Zippy.prototype.getContentElement = function() {
return /** @type {!HTMLElement} */ (this.elContent_);
Expand Down

0 comments on commit f4c4443

Please sign in to comment.