Skip to content

Commit 5891e97

Browse files
Lightning00BladeDevtools-frontend LUCI CQ
authored andcommitted
[cleanup] Remove any
Bug: none Change-Id: I97fe7f65e4156ade307dc5268caf51e79c9350a6 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6430026 Auto-Submit: Nikolay Vitkov <[email protected]> Reviewed-by: Benedikt Meurer <[email protected]> Commit-Queue: Nikolay Vitkov <[email protected]> Commit-Queue: Benedikt Meurer <[email protected]>
1 parent 5c0078a commit 5891e97

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

front_end/ui/legacy/UIUtils.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ import type {ToolbarButton} from './Toolbar.js';
6060
import {Tooltip} from './Tooltip.js';
6161
import type {TreeOutline} from './Treeoutline.js';
6262
import {Widget} from './Widget.js';
63+
import type {XWidget} from './XWidget.js';
6364

6465
declare global {
6566
interface HTMLElementTagNameMap {
@@ -1830,14 +1831,12 @@ function updateWidgetfocusWidgetForNode(node: Node|null): void {
18301831

18311832
function updateXWidgetfocusWidgetForNode(node: Node|null): void {
18321833
node = node?.parentNodeOrShadowHost() ?? null;
1833-
const XWidgetCtor = customElements.get('x-widget');
1834+
const XWidgetConstructor = customElements.get('x-widget') as Platform.Constructor.Constructor<XWidget>| undefined;
18341835
let widget = null;
18351836
while (node) {
1836-
if (XWidgetCtor && node instanceof XWidgetCtor) {
1837+
if (XWidgetConstructor && node instanceof XWidgetConstructor) {
18371838
if (widget) {
1838-
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
1839-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1840-
(node as any).defaultFocusedElement = widget;
1839+
node.defaultFocusedElement = widget;
18411840
}
18421841
widget = node;
18431842
}

front_end/ui/legacy/XWidget.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ const storedScrollPositions = new WeakMap<Element, {
1313

1414
export class XWidget extends XElement {
1515
private visible: boolean;
16-
private readonly shadowRootInternal!: DocumentFragment|null;
17-
private defaultFocusedElement: Element|null;
16+
defaultFocusedElement: Element|null;
1817
private elementsToRestoreScrollPositionsFor: Element[];
1918
private onShownCallback!: (() => void)|null;
2019
private onHiddenCallback!: (() => void)|null;

0 commit comments

Comments
 (0)