Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix import routers into another router #40

Merged
merged 11 commits into from
Mar 3, 2025
Merged

Conversation

dilane3
Copy link
Contributor

@dilane3 dilane3 commented Mar 3, 2025

🔗 Related Issue

Import routers into another doesn't work as expected

🚀 Type of Change

  • 📖 Documentation (Updates to README, API docs, or comments)
  • 🐞 Bug Fix (Non-breaking fix for an issue)
  • ⚡ Performance (Optimizations for faster execution)
  • ✨ Feature (New functionality without breaking changes)
  • 🔧 Refactor (Code improvements without changing behavior)
  • 🧹 Chore (Build process, tooling, dependencies)
  • ⚠️ Breaking Change (Modifications that impact existing usage)

📜 Description

When initializing a new project with typescript especially, after having defined two separated routers and importing one into the main one, the app crashed directly because the typescript type doesn't fit.

The import property of the defineRouter function required a table of RouterComponent but received a Promise<RouterComponent>

✅ Checklist

  • I have linked a related issue or discussion.
  • I have updated documentation if needed.
  • I have tested the changes in a real project.
  • I have added tests or confirmed that existing tests pass.

Sorry, something went wrong.

@dilane3 dilane3 merged commit fa0ae0a into main Mar 3, 2025
2 checks passed
@dilane3 dilane3 deleted the fix/routing-system branch March 3, 2025 22:18
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.

None yet

1 participant