Skip to content

Clarify selectNodes is required, not optional - #1201

Closed
grigasp with Copilot wants to merge 1 commit into
eslint/no-unnecessary-condition-rulefrom
copilot/sub-pr-1200
Closed

Clarify selectNodes is required, not optional#1201
grigasp with Copilot wants to merge 1 commit into
eslint/no-unnecessary-condition-rulefrom
copilot/sub-pr-1200

Conversation

Copilot AI commented Jan 27, 2026

Copy link
Copy Markdown
Contributor

Addressed review feedback questioning why selectNodes was treated as optional in TreeRenderer.tsx.

Analysis

selectNodes is defined as required in TreeRendererProps:

export type TreeRendererProps = {
  selectNodes: (nodeIds: Array<string>, changeType: SelectionChangeType) => void;
  // ... other props
};

UseSelectionHandlerProps preserves this via Pick<TreeRendererProps, "selectNodes" | "rootNodes">, making selectNodes required throughout the type chain.

The original removal of ?? noopSelectNodes fallback was correct - no code changes needed.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@changeset-bot

changeset-bot Bot commented Jan 27, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f3cdc42

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI changed the title [WIP] WIP Address feedback on @typescript-eslint/no-unnecessary-condition Clarify selectNodes is required, not optional Jan 27, 2026
Copilot AI requested a review from grigasp January 27, 2026 14:55
@grigasp grigasp closed this Jan 27, 2026
@grigasp
grigasp deleted the copilot/sub-pr-1200 branch January 27, 2026 15:02
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