-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
docs: remove d suffix in example #33298
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
Conversation
|
|
Walkthrough
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
docs/2.guide/2.directory-structure/1.shared.md (1)
80-81: Add a brief note explaining why.d.tsis discouraged here.A one-liner will pre-empt questions:
.d.tsfiles are for ambient declarations, aren’t transpiled, and can confuse tooling/auto‑imports; prefer.tswithexport type/interface.Apply after the directory block:
-----| bar.ts # Auto-imported+::tip
+Prefer.tsover.d.tsinshared/types/..d.tsfiles are for ambient declarations only and aren’t transpiled; using.tswithexport type/interfaceplays better with editor tooling and Nuxt’s scanning.
+::
+
Any other files you create in theshared/folder must be manually imported using the#sharedalias (automatically configured by Nuxt):</blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used**: CodeRabbit UI **Review profile**: CHILL **Plan**: Pro <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 43f07f8100649c7cd3b4698504471df5ebc47510 and 45d134ba22e53906af033892d9ba9816c1756fbe. </details> <details> <summary>📒 Files selected for processing (1)</summary> * `docs/2.guide/2.directory-structure/1.shared.md` (1 hunks) </details> <details> <summary>🔇 Additional comments (1)</summary><blockquote> <details> <summary>docs/2.guide/2.directory-structure/1.shared.md (1)</summary><blockquote> `80-81`: **LGTM: replacing `bar.d.ts` with `bar.ts` in the example is correct.** This better reflects recommended practice for `shared/types` (type exports from `.ts` files instead of ambient `.d.ts`). </blockquote></details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
🔗 Linked issue
N/A
📚 Description
The shared imports uses a
*.d.tsfile in the example, but this is not recommended.