You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
@wdio/elements@1.3.0: published .d.ts imports unpublished @wdio/devtools-core, re-exported types resolve to any #582
@wdio/elements@1.3.0 ships dist/_tsup-dts-rollup.d.ts, which imports from @wdio/devtools-core/*:
importtype{AccessibilityNode}from'@wdio/devtools-core/element-types';import{buildSnapshot}from'@wdio/devtools-core/element-snapshot';import{ANDROID_INTERACTABLE_TAGS}from'@wdio/devtools-core/locators';importtype{BrowserElementInfo}from'@wdio/devtools-core/element-types';// … ~20 more from @wdio/devtools-core/{element-types,element-snapshot,locators}
@wdio/devtools-core is not published (npm view @wdio/devtools-core returns E404) and is not in dependencies. The runtime bundle inlines it, so the JS works; the type declarations do not.
Impact
skipLibCheck: false: consumers get TS2307: Cannot find module '@wdio/devtools-core/…' (45 errors in @wdio/mcp).
skipLibCheck: true (common): errors are hidden, but every type re-exported from devtools-core silently becomes any:
importtype{BrowserElementInfo,GetMobileElementsOptions}from'@wdio/elements';exportconsta: BrowserElementInfo=42;// compiles: anyexportconstb: GetMobileElementsOptions='nonsense';// TS2559, declared locally so it resolves
Affected: BrowserElementInfo, GetBrowserElementsOptions, AccessibilityNode, Bounds, ElementWithLocators and the other locators exports, so results of getElements / getInteractableBrowserElements are untyped for consumers.
Reproduction
npm i @wdio/elements@1.3.0 typescript
Put the snippet above in t.ts
npx tsc --noEmit --strict --module nodenext --moduleResolution nodenext t.ts: only b errors
Same with --skipLibCheck false: TS2307 for @wdio/devtools-core/*
Suggested fix
Inline the internal package's declarations into the rollup: api-extractor bundledPackages: ['@wdio/devtools-core'], or tsup dts: { resolve: ['@wdio/devtools-core'] }. Alternatively publish @wdio/devtools-core and add it to dependencies.
Activity