commit | 29324b698ccd8920bc81c71d42dadc6310f0ad0f | [log] [tgz] |
---|---|---|
author | mfoltz <mfoltz@chromium.org> | Fri Oct 05 18:17:11 2018 |
committer | mark a. foltz <mfoltz@chromium.org> | Fri Nov 02 18:41:18 2018 |
tree | 4dee86ddcf33697d03b3ab21aa5434f65007f4a0 | |
parent | bb38bae599b4e1c54fb5c6634c9a406e3bd0a8bd [diff] |
Fix/suppress JSCompiler errors in advance of b/117162687 && b/117162806 Most of these errors come from the compiler being stricter about the types of destructured parameters inside a function, instead of allowing you to assign anything to a destructured parameter. For example, this code will start causing a type warning: /** @param {{age: (number|undefined}} data */ function f({age = 'not a number'}) {} // assigning a string to age won't work anymore Patch cl/215814610 to reproduce. Full list of errors here: https://lharker.users.x20web.corp.google.com/jscompiler_build_errors/destructuring_move/2018-10-01-no-typecheck-changes/errors_from_destructured_change.txt Most of the time, I either widened the accepted type of the parameter or added a cast to unblock the compiler change, since I'm unfamiliar with your code. Please suggest an edit if you want a different fix. Tested: TAP --sample for global presubmit queue http://test/OCL:215817386:BASE:215874198:1538735488381:5992305d PiperOrigin-RevId: 215935888