From 20b207e142dfc7d6485ed9de6627deb69afe6037 Mon Sep 17 00:00:00 2001 From: Peter Burns Date: Mon, 9 Mar 2020 17:59:22 -0700 Subject: [PATCH] Annotate more return types as !defined (#5642) --- lib/legacy/legacy-element-mixin.js | 2 +- lib/legacy/polymer.dom.js | 2 +- lib/mixins/properties-mixin.js | 4 ++-- lib/mixins/property-effects.js | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/legacy/legacy-element-mixin.js b/lib/legacy/legacy-element-mixin.js index 67276c92f6..8e38e62940 100644 --- a/lib/legacy/legacy-element-mixin.js +++ b/lib/legacy/legacy-element-mixin.js @@ -1198,7 +1198,7 @@ export const LegacyElementMixin = dedupingMixin((base) => { * * @param {string} methodName Method name to associate with message * @param {...*} args Array of strings or objects to log - * @return {Array} Array with formatting information for `console` + * @return {!Array} Array with formatting information for `console` * logging. * @override */ diff --git a/lib/legacy/polymer.dom.js b/lib/legacy/polymer.dom.js index 22b863e0e7..2c89c56a35 100644 --- a/lib/legacy/polymer.dom.js +++ b/lib/legacy/polymer.dom.js @@ -113,7 +113,7 @@ class DomApiNative { /** * Returns the root node of this node. Equivalent to `getRootNode()`. * - * @return {Node} Top most element in the dom tree in which the node + * @return {!Node} Top most element in the dom tree in which the node * exists. If the node is connected to a document this is either a * shadowRoot or the document; otherwise, it may be the node * itself or a node or document fragment containing it. diff --git a/lib/mixins/properties-mixin.js b/lib/mixins/properties-mixin.js index b13e6e154e..fe686b3580 100644 --- a/lib/mixins/properties-mixin.js +++ b/lib/mixins/properties-mixin.js @@ -17,8 +17,8 @@ import { PropertiesChanged } from './properties-changed.js'; * Creates a copy of `props` with each property normalized such that * upgraded it is an object with at least a type property { type: Type}. * - * @param {Object} props Properties to normalize - * @return {Object} Copy of input `props` with normalized properties that + * @param {!Object} props Properties to normalize + * @return {!Object} Copy of input `props` with normalized properties that * are in the form {type: Type} * @private */ diff --git a/lib/mixins/property-effects.js b/lib/mixins/property-effects.js index 122201d3d6..62c8e6fa08 100644 --- a/lib/mixins/property-effects.js +++ b/lib/mixins/property-effects.js @@ -590,7 +590,7 @@ function getComputedOrder(inst) { * * @param {!Polymer_PropertyEffects} inst The instance to generate dependency * counts for. - * @return {Object} Object containing `counts` map (property-to-dependency + * @return {!Object} Object containing `counts` map (property-to-dependency * count) and pre-populated `ready` array of properties that had zero * dependencies. */ @@ -985,7 +985,7 @@ function addNotifyListener(node, inst, binding) { * @param {boolean|Object=} dynamicFn Boolean or object map indicating whether * method names should be included as a dependency to the effect. Note, * defaults to true if the signature is static (sig.static is true). - * @return {Object} Effect metadata for this method effect + * @return {!Object} Effect metadata for this method effect * @private */ function createMethodEffect(model, sig, type, effectFn, methodInfo, dynamicFn) { @@ -2167,7 +2167,7 @@ export const PropertyEffects = dedupingMixin(superClass => { * @param {number} start Index from which to start removing/inserting. * @param {number=} deleteCount Number of items to remove. * @param {...*} items Items to insert into array. - * @return {Array} Array of removed items. + * @return {!Array} Array of removed items. * @public */ splice(path, start, deleteCount, ...items) { @@ -2439,7 +2439,7 @@ export const PropertyEffects = dedupingMixin(superClass => { * @param {!Array} args Array of argument metadata * @param {string} path Property/path name that triggered the method effect * @param {Object} props Bag of current property changes - * @return {Array<*>} Array of argument values + * @return {!Array<*>} Array of argument values * @private */ _marshalArgs(args, path, props) {