Skip to content

Commit 20b207e

Browse files
authored
Annotate more return types as !defined (#5642)
1 parent 22e1d02 commit 20b207e

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

lib/legacy/legacy-element-mixin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,7 @@ export const LegacyElementMixin = dedupingMixin((base) => {
11981198
*
11991199
* @param {string} methodName Method name to associate with message
12001200
* @param {...*} args Array of strings or objects to log
1201-
* @return {Array} Array with formatting information for `console`
1201+
* @return {!Array} Array with formatting information for `console`
12021202
* logging.
12031203
* @override
12041204
*/

lib/legacy/polymer.dom.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class DomApiNative {
113113
/**
114114
* Returns the root node of this node. Equivalent to `getRootNode()`.
115115
*
116-
* @return {Node} Top most element in the dom tree in which the node
116+
* @return {!Node} Top most element in the dom tree in which the node
117117
* exists. If the node is connected to a document this is either a
118118
* shadowRoot or the document; otherwise, it may be the node
119119
* itself or a node or document fragment containing it.

lib/mixins/properties-mixin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import { PropertiesChanged } from './properties-changed.js';
1717
* Creates a copy of `props` with each property normalized such that
1818
* upgraded it is an object with at least a type property { type: Type}.
1919
*
20-
* @param {Object} props Properties to normalize
21-
* @return {Object} Copy of input `props` with normalized properties that
20+
* @param {!Object} props Properties to normalize
21+
* @return {!Object} Copy of input `props` with normalized properties that
2222
* are in the form {type: Type}
2323
* @private
2424
*/

lib/mixins/property-effects.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ function getComputedOrder(inst) {
590590
*
591591
* @param {!Polymer_PropertyEffects} inst The instance to generate dependency
592592
* counts for.
593-
* @return {Object} Object containing `counts` map (property-to-dependency
593+
* @return {!Object} Object containing `counts` map (property-to-dependency
594594
* count) and pre-populated `ready` array of properties that had zero
595595
* dependencies.
596596
*/
@@ -985,7 +985,7 @@ function addNotifyListener(node, inst, binding) {
985985
* @param {boolean|Object=} dynamicFn Boolean or object map indicating whether
986986
* method names should be included as a dependency to the effect. Note,
987987
* defaults to true if the signature is static (sig.static is true).
988-
* @return {Object} Effect metadata for this method effect
988+
* @return {!Object} Effect metadata for this method effect
989989
* @private
990990
*/
991991
function createMethodEffect(model, sig, type, effectFn, methodInfo, dynamicFn) {
@@ -2167,7 +2167,7 @@ export const PropertyEffects = dedupingMixin(superClass => {
21672167
* @param {number} start Index from which to start removing/inserting.
21682168
* @param {number=} deleteCount Number of items to remove.
21692169
* @param {...*} items Items to insert into array.
2170-
* @return {Array} Array of removed items.
2170+
* @return {!Array} Array of removed items.
21712171
* @public
21722172
*/
21732173
splice(path, start, deleteCount, ...items) {
@@ -2439,7 +2439,7 @@ export const PropertyEffects = dedupingMixin(superClass => {
24392439
* @param {!Array<!MethodArg>} args Array of argument metadata
24402440
* @param {string} path Property/path name that triggered the method effect
24412441
* @param {Object} props Bag of current property changes
2442-
* @return {Array<*>} Array of argument values
2442+
* @return {!Array<*>} Array of argument values
24432443
* @private
24442444
*/
24452445
_marshalArgs(args, path, props) {

0 commit comments

Comments
 (0)