Skip to content

fix: support autoimports typeFrom property for declaration gen - #3670

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

pi0 merged 2 commits into
nitrojs:v2from
8ctavio:fix/generate-declarations

Conversation

@8ctavio

@8ctavio 8ctavio commented Oct 21, 2025

Copy link
Copy Markdown
Contributor

🔗 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

vercel Bot commented Oct 21, 2025

Copy link
Copy Markdown

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

A member of the Team first needs to authorize it.

@pi0 pi0 left a comment

Copy link
Copy Markdown
Member

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

pkg-pr-new Bot commented Oct 23, 2025

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 9ae1906

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