Skip to content

Comments

fix(core): align createNodesFromFiles options type with createNodes callback#30332

Closed
RobbyRabbitman wants to merge 1 commit intonrwl:masterfrom
RobbyRabbitman:fix/create-nodes-from-files-align-option-type-with-callback
Closed

fix(core): align createNodesFromFiles options type with createNodes callback#30332
RobbyRabbitman wants to merge 1 commit intonrwl:masterfrom
RobbyRabbitman:fix/create-nodes-from-files-align-option-type-with-callback

Conversation

@RobbyRabbitman
Copy link
Contributor

@RobbyRabbitman RobbyRabbitman commented Mar 11, 2025

Current Behavior

type of option from createNodes() callback does not match type of option of createNodesFromFiles. Change was introduced in 20.5.0 by #29935.

A workaround in 20.5.0 is to get a type by using Parameters<typeof createNodesFromFiles<MyOptions>>[0]. Before 20.5.0 you could use CreateNodesFunction<MyOptions> when you wanted to type your createNodes function. Of course you could pass an arrow function, but I think many plugin authors use a separate function.

Expected Behavior

They should have the same types or there should be a public type of the createNodes() callback, so that users have better dx.

Related Issue(s)

Fixes #

@RobbyRabbitman RobbyRabbitman requested a review from a team as a code owner March 11, 2025 11:30
@vercel
Copy link

vercel bot commented Mar 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Mar 11, 2025 11:33am

@FrozenPandaz FrozenPandaz added the priority: medium Medium Priority (not high, not low priority) label May 14, 2025
@github-actions github-actions bot added the stale label Nov 11, 2025
@github-actions github-actions bot closed this Dec 2, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

priority: medium Medium Priority (not high, not low priority) stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants