fix: make ThierryadeCoverageReporterOptions assignable under TypeScript 6 #12

Merged
Gilles merged 1 commit from fix/ts6-reporter-options-variance into master 2026-10-27 10:07:31 +00:00
Owner

Closes #11

TypeScript 6 tightened constructor-parameter variance checks:
Partial<ThierryadeCoverageReporterOptions> (only outDir?: string,
no index signature) has no properties in common with the base
reporter's Partial<Options> (which has [key: string]: unknown), so
ThierryadeCoverageReporter stops being a valid bare reporters: [...] entry.

Fix: add the same index signature @wdio/types' own Options
interface has, and a compile-time guard (src/reporter.ts) so a
future regression fails this repo's own build instead of a
consumer's tsc.

pnpm run build, pnpm run lint, pnpm run test all pass locally.

🤖 Generated with Claude Code

https://claude.ai/code/session_013EeueXTWCT4Y6EbeideZcm

Closes #11 TypeScript 6 tightened constructor-parameter variance checks: `Partial<ThierryadeCoverageReporterOptions>` (only `outDir?: string`, no index signature) has no properties in common with the base reporter's `Partial<Options>` (which has `[key: string]: unknown`), so `ThierryadeCoverageReporter` stops being a valid bare `reporters: [...]` entry. Fix: add the same index signature `@wdio/types`' own `Options` interface has, and a compile-time guard (`src/reporter.ts`) so a future regression fails this repo's own build instead of a consumer's `tsc`. `pnpm run build`, `pnpm run lint`, `pnpm run test` all pass locally. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_013EeueXTWCT4Y6EbeideZcm
fix: make ThierryadeCoverageReporterOptions assignable under TypeScript 6
All checks were successful
ci / build (pull_request) Successful in 26s
ci / publish (pull_request) Has been skipped
a9b9675364
TypeScript 6 tightened constructor-parameter variance checks: without
an index signature, Partial<ThierryadeCoverageReporterOptions> has no
properties in common with the base reporter's Partial<Options>, so the
class stops being a valid bare `reporters: [...]` entry. Add the index
signature (matching @wdio/types' own Options) and a compile-time guard
so a future regression fails the build instead of a consumer's tsc.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013EeueXTWCT4Y6EbeideZcm
Author
Owner
<!-- argus-link-bot:thierryade/thierryade-wdio --> 📊 [Rapports Argus pour cette PR](https://reports.stationmyr.net/thierryade/thierryade-wdio/pr/12)
Gilles merged commit c27669003d into master 2026-10-27 10:07:31 +00:00
Gilles deleted branch fix/ts6-reporter-options-variance 2026-10-27 10:07:31 +00:00
Sign in to join this conversation.
No description provided.