Skip to content

🤖 User test baselines have changed #27213

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

Merged
merged 1 commit into from
Sep 19, 2018

Conversation

typescript-bot
Copy link
Collaborator

Please review the diff and merge if no changes are unexpected.
You can view the build log here.

cc @weswigham @sandersn @RyanCavanaugh

Copy link
Member

@weswigham weswigham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These just look like the better error spans from diving into arrays and arrow return expressions.

Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some additional notes from chrome-devtools-frontend. The changes are all good this time, although the improvements expose more instances of known bugs.

@@ -51,8 +51,17 @@ node_modules/chrome-devtools-frontend/front_end/Tests.js(440,5): error TS2554: E
node_modules/chrome-devtools-frontend/front_end/Tests.js(475,5): error TS2554: Expected 4 arguments, but got 3.
node_modules/chrome-devtools-frontend/front_end/Tests.js(571,33): error TS2339: Property 'deprecatedRunAfterPendingDispatches' does not exist on type 'typeof InspectorBackend'.
node_modules/chrome-devtools-frontend/front_end/Tests.js(590,27): error TS2554: Expected 0 arguments, but got 1.
node_modules/chrome-devtools-frontend/front_end/Tests.js(619,44): error TS2339: Property 'emulationAgent' does not exist on type 'Target'.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previously SDK was typed as any, but not has the correct type. emulationAgent and inputAgent are indeed nowhere to be found in the declaration of SDK.Target. I think they might be injected by the test framework.

@@ -298,6 +307,12 @@ node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(2
node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(21,32): error TS2554: Expected 2 arguments, but got 1.
node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(26,32): error TS2694: Namespace 'Protocol' has no exported member 'DOM'.
node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(36,47): error TS2339: Property 'AnimationModel' does not exist on type '{ new (effect?: AnimationEffect, timeline?: AnimationTimeline): Animation; prototype: Animation; }'.
node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(36,63): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is better typed. In any case, we do not correctly instantiate T here because JS generics are not real generics and our fake instantiation code doesn't run here.

@@ -3182,6 +3217,7 @@ node_modules/chrome-devtools-frontend/front_end/bindings/ResourceScriptMapping.j
node_modules/chrome-devtools-frontend/front_end/bindings/ResourceScriptMapping.js(323,14): error TS2339: Property '_scriptSource' does not exist on type 'ResourceScriptFile'.
node_modules/chrome-devtools-frontend/front_end/bindings/ResourceScriptMapping.js(384,38): error TS2339: Property '_scriptSource' does not exist on type 'ResourceScriptFile'.
node_modules/chrome-devtools-frontend/front_end/bindings/ResourceScriptMapping.js(395,12): error TS2339: Property '_scriptSource' does not exist on type 'ResourceScriptFile'.
node_modules/chrome-devtools-frontend/front_end/bindings/ResourceUtils.js(72,32): error TS2339: Property 'asParsedURL' does not exist on type 'string'.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better typing of SDK.Target, and then we don't know about the monkeypatched String.asParsedURL

@@ -5438,6 +5403,10 @@ node_modules/chrome-devtools-frontend/front_end/elements/ElementsTreeOutline.js(
node_modules/chrome-devtools-frontend/front_end/elements/ElementsTreeOutline.js(566,29): error TS2339: Property 'naturalHeight' does not exist on type 'Element'.
node_modules/chrome-devtools-frontend/front_end/elements/ElementsTreeOutline.js(567,26): error TS2339: Property 'currentSrc' does not exist on type 'Element'.
node_modules/chrome-devtools-frontend/front_end/elements/ElementsTreeOutline.js(594,19): error TS2339: Property 'hovered' does not exist on type 'TreeElement'.
node_modules/chrome-devtools-frontend/front_end/elements/ElementsTreeOutline.js(608,30): error TS2345: Argument of type '{ mode: string; showInfo: boolean; }' is not assignable to parameter of type '{ mode: string; showInfo: boolean; selectors: string; }'.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why we missed this before. Maybe SDK was type any here too? In any case the new error is correct.

@@ -6181,6 +6098,16 @@ node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(71
node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(765,31): error TS2694: Namespace 'Common' has no exported member 'Event'.
node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(777,31): error TS2694: Namespace 'Common' has no exported member 'Event'.
node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(839,43): error TS2694: Namespace 'Extensions.ExtensionStatus' has no exported member 'Record'.
node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(881,30): error TS2339: Property 'resourceTreeModel' does not exist on type 'true | ResourceTreeFrame'.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why we missed this before, but the frame's auto type is correctly true | ResourceTreeFrame. This is a good bug to catch, too, because there is error handling, but it only handles the case that frame === false.

Type 'ToolbarText' is not assignable to type '{ item(): any & any; }'.
Property 'item' is missing in type 'ToolbarText'.
node_modules/chrome-devtools-frontend/front_end/ui/Toolbar.js(318,56): error TS2339: Property 'peekLast' does not exist on type '({ item(): any & any; } & { item(): any & any; })[]'.
node_modules/chrome-devtools-frontend/front_end/ui/Toolbar.js(246,10): error TS2339: Property '_toolbar' does not exist on type 'ToolbarItem'.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

types are now correct, but we still don't get an external expando assignment -- in UI.Toolbar.appendToolBarItem, we have the assignment item._toolbar = this.

Realistically, the solution is to have this._toolbar = undefined added in UI.ToolbarItem's constructor. I don't think we'll be able to support this pattern.

@sandersn sandersn merged commit 6ac38fe into microsoft:master Sep 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants