From 3a6b4d4a8dc490c29f80732bbf1f9a8d764b2426 Mon Sep 17 00:00:00 2001 From: Alex Rudenko Date: Fri, 27 Feb 2026 13:54:23 +0100 Subject: [PATCH] refactor: type-cast as internal CdpPage interface --- src/tools/pages.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/tools/pages.ts b/src/tools/pages.ts index f664080c8..2b1be2a51 100644 --- a/src/tools/pages.ts +++ b/src/tools/pages.ts @@ -5,7 +5,7 @@ */ import {logger} from '../logger.js'; -import type {Dialog} from '../third_party/index.js'; +import type {CdpPage, Dialog} from '../third_party/index.js'; import {zod} from '../third_party/index.js'; import {ToolCategory} from './categories.js'; @@ -385,8 +385,7 @@ export const getTabId = definePageTool({ }, handler: async (request, response, context) => { const page = context.getPageById(request.params.pageId); - // @ts-expect-error _tabId is internal. - const tabId = page.pptrPage._tabId; + const tabId = (page.pptrPage as unknown as CdpPage)._tabId; response.setTabId(tabId); }, });