Skip to content

fix: prevent key helpers from over-narrowing union key - #284

Merged
nyaomaru merged 2 commits into
mainfrom
fix/key-helper-single-location-narrowing
Aug 28, 2026
Merged

fix: prevent key helpers from over-narrowing union key#284
nyaomaru merged 2 commits into
mainfrom
fix/key-helper-single-location-narrowing

Conversation

@nyaomaru

Copy link
Copy Markdown
Owner

Summary

Prevent key helpers from over-narrowing union key.

Description

  • preserve precise narrowing for singleton literal keys
  • fall back to object-only or base-guard narrowing for union and broad keys
  • apply the safe behavior to hasKey, hasKeys, equalsKey, and narrowKeyTo

@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
is-kit-docs Ready Ready Preview Aug 28, 2026 3:44pm

Request Review

@nyaomaru

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f2545a0c65

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/core/key-internals.ts Outdated
@nyaomaru

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 37fe99e701

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@nyaomaru
nyaomaru marked this pull request as ready for review August 28, 2026 15:58
@nyaomaru
nyaomaru merged commit fa03a3d into main Aug 28, 2026
11 checks passed
@nyaomaru
nyaomaru deleted the fix/key-helper-single-location-narrowing branch August 28, 2026 16:03
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.

1 participant