-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exclude global types from devtools user test #20172
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it have 'node'
in order to find require
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a result of this change, or just an update in the baselines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
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.