ThierryadeCoverageReporter is no longer assignable to ReporterClass under TypeScript 6 #11

Closed
opened 2026-10-27 10:03:01 +00:00 by Gilles · 0 comments
Owner

tsc --noEmit fails for any consumer that puts ThierryadeCoverageReporter
bare into reporters: [...] (e.g. wdio.conf.ts) once upgraded to
TypeScript 6:

wdio.conf.ts(41,23): error TS2322: Type 'typeof ThierryadeCoverageReporter' is not
assignable to type 'ReporterEntry'.
  Type 'typeof ThierryadeCoverageReporter' is not assignable to type 'ReporterClass'.
    Types of parameters 'options' and 'options' are incompatible.
      Type 'Partial<Options>' has no properties in common with type
'Partial<ThierryadeCoverageReporterOptions>'.

Cause: ThierryadeCoverageReporterOptions only declares outDir?: string,
with no index signature. TypeScript 6 checks constructor-parameter variance
against ReporterClass (new (options: Partial<Options>): ReporterInstance,
where Options has an index signature [key: string]: unknown) more
strictly -- without an index signature on our side, the two types
structurally have "no properties in common".

Minimal repro confirmed on this repo with typescript@6.0.3 +
@wdio/types@10.1.0.

First encountered on Filao/e2e PR #10 (Renovate bump of typescript to v6).

`tsc --noEmit` fails for any consumer that puts `ThierryadeCoverageReporter` bare into `reporters: [...]` (e.g. `wdio.conf.ts`) once upgraded to TypeScript 6: ``` wdio.conf.ts(41,23): error TS2322: Type 'typeof ThierryadeCoverageReporter' is not assignable to type 'ReporterEntry'. Type 'typeof ThierryadeCoverageReporter' is not assignable to type 'ReporterClass'. Types of parameters 'options' and 'options' are incompatible. Type 'Partial<Options>' has no properties in common with type 'Partial<ThierryadeCoverageReporterOptions>'. ``` Cause: `ThierryadeCoverageReporterOptions` only declares `outDir?: string`, with no index signature. TypeScript 6 checks constructor-parameter variance against `ReporterClass` (`new (options: Partial<Options>): ReporterInstance`, where `Options` has an index signature `[key: string]: unknown`) more strictly -- without an index signature on our side, the two types structurally have "no properties in common". Minimal repro confirmed on this repo with `typescript@6.0.3` + `@wdio/types@10.1.0`. First encountered on `Filao/e2e` PR #10 (Renovate bump of `typescript` to v6).
Gilles changed title from ThierryadeCoverageReporter n'est plus assignable à ReporterClass sous TypeScript 6 to ThierryadeCoverageReporter is no longer assignable to ReporterClass under TypeScript 6 2026-10-27 10:06:40 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thierryade/thierryade-wdio#11
No description provided.