`packages/extension` fails typecheck on `main` (3 errors in `connectedTabGroup.ts`), and `npm run tsc` does not check it
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- build-system, developer-experience
Research direction
Start with packages/extension/src/connectedTabGroup.ts and run the two tsc commands listed in the issue to reproduce the errors. Check the root package scripts, tsconfig.json, eslint.config.mjs, and extension workflow before deciding whether the root typecheck should include both extension configs. Done means the extension typechecks cleanly and any chosen npm or workflow check reliably catches regressions.
Written by the indexing model from the issue text.
Description
Steps
On current main (87291ca60), after npm ci && npm run build:
cd packages/extension
npx tsc -p tsconfig.json --noEmit
npx tsc -p tsconfig.ui.json --noEmit
Actual
tsconfig.ui.json is clean. tsconfig.json fails:
src/connectedTabGroup.ts(79,74): error TS2694: Namespace 'chrome.tabs' has no exported member 'TabChangeInfo'.
src/connectedTabGroup.ts(119,64): error TS2694: Namespace 'chrome.tabs' has no exported member 'TabChangeInfo'.
src/connectedTabGroup.ts(221,49): error TS2345: Argument of type 'number[]' is not assignable to parameter of type 'number | [number, ...number[]]'.
Type 'number[]' is not assignable to type '[number, ...number[]]'.
Source provides no match for required element at position 0 in target.
The built extension is fine (vite strips types), so this is typing only.
Cause
- #41497 bumped
@types/chromefrom^0.0.315to0.2.0. In 0.2.0chrome.tabs.TabChangeInfobecamechrome.tabs.OnUpdatedInfo, andchrome.tabs.ungroup()takesnumber | [number, ...number[]]instead ofnumber | number[].connectedTabGroup.tsstill uses the old shapes. - Nothing flagged it because the root
tsconfig.jsonexcludespackages/extension(since #40429), and nothing typechecks the extension's owntsconfig.json/tsconfig.ui.json:eslint.config.mjspoints the parser at them for type-aware rules, but that does not report TS errors, andnpm run tsc,flintand the workflows don't run them.tests_extension.ymlonly runsnpm run build, which bundles with vite without typechecking.
Expected
A. tsc -p packages/extension/tsconfig.json passes. The fix is small: TabChangeInfo -> OnUpdatedInfo (2 places), and ungroupTabs() returns early on an empty array and passes the ids as [number, ...number[]] (all current callers already skip empty arrays). I'd like to send this fix. Could someone assign this to me?
B. Should npm run tsc (and so flint/lint) also run the two extension tsconfigs, e.g. tsc -p . && tsc -p packages/extension/tsconfig.json && tsc -p packages/extension/tsconfig.ui.json? #40429 excluded it on purpose (the extension has its own types/moduleResolution), so I'm asking rather than proposing it. Without something like this the errors above can come back unnoticed.
- Dominant language
- TypeScript
- Stars
- 97.4k
- Forks
- 6.6k
- Avg merge
- 22h 46m
- Merged PRs (30d)
- 245
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/playwright
-
[Bug]: [MCP/CLI] Bare loopback IP addresses (127.0.0.1:port) and hosts with ports fail to navigate due to erroneous scheme inferencePossibly taken @alok-108 claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
microsoft/playwright#43263 ·
Maintainers usually reply within 1 day
-
[Bug]: [MCP] browser_navigate_back and browser_navigate_forward hang on modal dialogs instead of racing against modal statesPossibly taken @alok-108 claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
microsoft/playwright#43251 ·
Maintainers usually reply within 1 day
-
[Feature]: Set `this.name` in `TargetClosedError` constructorMay be free again @LeonxLJX claimed this 38 days ago, and no pull request is open. OpenP3-collecting-feedback
Difficulty 1/5 Under an hour Newbie friendliness 86/100
microsoft/playwright#42522 · 7 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
microsoft/playwright#43285 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
microsoft/playwright#43283 · 1 comment ·
Maintainers usually reply within 1 day
All issues in microsoft/playwright
Similar issues
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 80/100
alunduil/projects-v2-sync#21 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
enhancement minor
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
testcontainers/testcontainers-node#1539 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
christopher-buss/eslint-plugin-flawless#72 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
openwatersio/slackwater-database#281 ·
Maintainers usually reply within 1 day