Suppress reportUnknownTypes in ui/webui/resources/js/assert.js
This allows client code to type-check JS with (e.g.) js_type_check("closure_compile") { closure_flags = default_closure_args + [ "jscomp_error=strictCheckTypes", "jscomp_error=reportUnknownTypes", ] ... } for picking up a wide class of type errors that otherwise slip through. Note the maintenance cost of actually _landing_ a rule with `reportUnknownTypes` is probably too high. The purpose of this CL is to at least allow developers to temporarily add reportUnknownTypes to validate their own type coverage accurately in a chrome developer checkout. Suppresses: ../../ui/webui/resources/js/assert.js:**: ERROR - [JSC_UNKNOWN_EXPR_TYPE] could not determine the type of this expression 20: if (!condition) { ^^^^^^^^^ 26: const global = function() { ^^^^^^^^^^^^ 27: const thisOrSelf = this || self; ^^^^ 29: thisOrSelf.traceAssertionsForTesting; ^^^^^^^^^^ 30: return thisOrSelf; ^^^^^^^^^^ 32: if (global.traceAssertionsForTesting) { ^^^^^^ 37: return condition; ^^^^^^^^^ Bug: 1000989 Change-Id: I73564b17688df1b08d2a2eb6f78177dcde39faa3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1902182Reviewed-by:Dan Beam <dbeam@chromium.org> Commit-Queue: Trent Apted <tapted@chromium.org> Cr-Commit-Position: refs/heads/master@{#713639}
Showing
Please register or sign in to comment