Skip to content

fix(types): exclude undefined stat overloads - #10014

Closed
OrcaWin wants to merge 1 commit into
mainfrom
fix/node-types-stat-nonnull
Closed

OrcaWin wants to merge 1 commit into
mainfrom
fix/node-types-stat-nonnull

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Exclude undefined from the promise stat overload return type in the two affected type boundaries.
  • Restore typecheck after the locked @types/node update without changing runtime behavior.

Reproduction

After a fresh pnpm install --frozen-lockfile on current main, pnpm typecheck reports TS18048 in worktree-common-git-directory.ts and skill-installation-topology.ts because ReturnType includes the callback overload nullable branch in the updated declarations.

Validation

  • Fresh locked dependency install reproduced the failure before this change.
  • pnpm typecheck passes after this change.
  • Scoped oxlint and formatting pass.
  • Runtime behavior is unchanged; both functions still receive successful stat results only.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b5c409e2-1e72-4a9d-a1c1-5a6b6a721f0e

📥 Commits

Reviewing files that changed from the base of the PR and between 01bcc57 and 0a70b33.

📒 Files selected for processing (2)
  • src/main/ipc/worktree-common-git-directory.ts
  • src/main/skills/skill-installation-topology.ts

📝 Walkthrough

Walkthrough

Tightened two stat-related type definitions by wrapping awaited stat return types with NonNullable. The worktree directory metadata type and the skillPhysicalIdentity function parameter now exclude null and undefined stat results. Runtime logic remains unchanged.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning It covers summary and validation, but omits required Screenshots, Testing checklist, AI Review Report, Security Audit, and Notes sections. Add the missing template sections and include the testing checklist, AI review details, security audit, screenshots or 'No visual change,' and notes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: tightening stat overload types to exclude undefined.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@OrcaWin

OrcaWin commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by the two direct-to-main PRs #10011 and #10012. The two-line Node declaration compatibility commit is present in both branch histories so their refreshed-dependency CI can pass; it will naturally disappear from the remaining diff after either lands.

@OrcaWin OrcaWin closed this Jul 22, 2026
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