mirror of
https://github.com/ChromeDevTools/chrome-devtools-mcp.git
synced 2026-11-04 15:00:11 +00:00
refactor: type-cast as internal CdpPage interface (#1064)
This commit is contained in:
1 parent
f763da24a1
commit
2d5e4fa357
1 file changed
+2
-3
+2
-3
@@ -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);
|
||||
},
|
||||
});
|
||||
Reference in new issue
Block a user