Skip to content

fix: support autoimports typeFrom property for declaration gen#3670

Merged
pi0 merged 2 commits intonitrojs:v2from
8ctavio:fix/generate-declarations
Oct 23, 2025
Merged

fix: support autoimports typeFrom property for declaration gen#3670
pi0 merged 2 commits intonitrojs:v2from
8ctavio:fix/generate-declarations

Conversation

@8ctavio
Copy link
Copy Markdown
Contributor

@8ctavio 8ctavio commented Oct 21, 2025

🔗 Linked issue

#3669

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Inside the writeTypes function, an import's path specifier is now retrieved from _import.typeFrom || _import.from instead of only _import.from, so that typeFrom is used for generated declaration files, if provided.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@8ctavio 8ctavio requested a review from pi0 as a code owner October 21, 2025 22:54
@vercel
Copy link
Copy Markdown

vercel Bot commented Oct 21, 2025

@8ctavio is attempting to deploy a commit to the Nitro Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

Thanks ❤️

@pi0 pi0 changed the title fix: support autoimports' typeFrom property for declaration file generation fix: support autoimports typeFrom property for declaration gen Oct 23, 2025
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Oct 23, 2025

Open in StackBlitz

npm i https://pkg.pr.new/nitrojs/nitro/nitropack@3670

commit: 9ae1906

@pi0 pi0 merged commit 16ee447 into nitrojs:v2 Oct 23, 2025
5 of 6 checks passed
@8ctavio 8ctavio deleted the fix/generate-declarations branch January 20, 2026 20:57
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