Skip to content

Commit 2d5e4fa

Browse files
authored
refactor: type-cast as internal CdpPage interface (#1064)
1 parent f763da2 commit 2d5e4fa

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/tools/pages.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
import {logger} from '../logger.js';
8-
import type {Dialog} from '../third_party/index.js';
8+
import type {CdpPage, Dialog} from '../third_party/index.js';
99
import {zod} from '../third_party/index.js';
1010

1111
import {ToolCategory} from './categories.js';
@@ -385,8 +385,7 @@ export const getTabId = definePageTool({
385385
},
386386
handler: async (request, response, context) => {
387387
const page = context.getPageById(request.params.pageId);
388-
// @ts-expect-error _tabId is internal.
389-
const tabId = page.pptrPage._tabId;
388+
const tabId = (page.pptrPage as unknown as CdpPage)._tabId;
390389
response.setTabId(tabId);
391390
},
392391
});

0 commit comments

Comments
 (0)