Repository navigation
Exclude global types from devtools user test - #20172
Conversation
Nathan Shively-Sanders (sandersn)
left a comment
There was a problem hiding this comment.
A couple of questions, although I think it's fine to merge.
| node_modules/chrome-devtools-frontend/front_end/cm/comment.js(6,17): error TS2307: Cannot find module '../../lib/codemirror'. | ||
| node_modules/chrome-devtools-frontend/front_end/cm/comment.js(7,19): error TS2304: Cannot find name 'define'. | ||
| node_modules/chrome-devtools-frontend/front_end/cm/comment.js(7,43): error TS2304: Cannot find name 'define'. | ||
| node_modules/chrome-devtools-frontend/front_end/cm/comment.js(8,5): error TS2304: Cannot find name 'define'. | ||
| node_modules/chrome-devtools-frontend/front_end/cm/markselection.js(12,9): error TS2304: Cannot find name 'require'. |
There was a problem hiding this comment.
should it have 'node' in order to find require?
There was a problem hiding this comment.
require in these files is part of a UMD header. It's not actually in use, in the strictest sense:
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {and chrome doesn't define it in their externs file (likely because the entire cm folder is marked as external, and so is not strictly checked).
| @@ -5866,7 +5886,7 @@ node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(8795,39): error | |||
| node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(8799,38): error TS2339: Property 'offset' does not exist on type '{ [x: string]: any; node: any; start: number; end: number; collapse: any; coverStart: any; coverE...'. | |||
| Property 'offset' does not exist on type '{ [x: string]: any; node: any; start: number; end: number; collapse: any; coverStart: any; coverE...'. | |||
| node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(8817,16): error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'number'. | |||
| node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(8818,3): error TS2322: Type 'Timer' is not assignable to type 'boolean'. | |||
| node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(8818,3): error TS2322: Type 'number' is not assignable to type 'boolean'. | |||
There was a problem hiding this comment.
is this a result of this change, or just an update in the baselines?
There was a problem hiding this comment.
node re-typed setTimeout to return Timer instead of just number.
|
This only gets rid of a few of the absolute paths in error messages. I agree that we should address this generally in the compiler. |
|
Mohamed Hegazy (@mhegazy) already opened #20178 to track |
Because it contained a handful of conflicting declarations which happened to trigger an error from #19356, which has a machine-specific path in the message.
Could we revert #19356 and instead implement #10489 in the near future? At least internally I don't think we've ever been happy with seeing those paths in any baselines; especially when they appear in a library file.