Skip to content

fix: improve type checking for OptionalLoggerImpl#44

Merged
arv merged 3 commits into
mainfrom
arv/improve-type
Jul 2, 2026
Merged

fix: improve type checking for OptionalLoggerImpl#44
arv merged 3 commits into
mainfrom
arv/improve-type

Conversation

@arv

@arv arv commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Use the this type and not the interface because the implementation has private fields.

Use the `this` type and not the interface because the implementation has
private fields.
Copilot AI review requested due to automatic review settings July 2, 2026 09:32
@arv arv added this pull request to the merge queue Jul 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refines the OptionalLogger API surface so the this context for its callable properties is typed as the concrete receiver type (polymorphic this) rather than the OptionalLogger interface type, which improves type-checking for implementations that use private fields (e.g., OptionalLoggerImpl with #logSink / #context).

Changes:

  • Updated OptionalLogger callable property types (error/info/warn/debug/flush) to use this: this.
  • Updated OptionalLoggerImpl callable property types to use this: this, aligning implementation typing with private-field usage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Merged via the queue into main with commit 58673fb Jul 2, 2026
6 checks passed
@arv arv deleted the arv/improve-type branch July 2, 2026 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants