Skip to content

Conversation

@bencodezen
Copy link
Collaborator

@bencodezen bencodezen commented Sep 22, 2025

🔗 Linked issue

N/A

📚 Description

The shared imports uses a *.d.ts file in the example, but this is not recommended.

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@coderabbitai
Copy link

coderabbitai bot commented Sep 22, 2025

Walkthrough

  • Updated documentation in docs/2.guide/2.directory-structure/1.shared.md to reflect the addition of shared/types/bar.ts and its Auto-imported status alongside bar.d.ts.
  • Revised the directory structure example to include shared/types/bar.ts as auto-imported.
  • Added usage notes and code examples demonstrating manual imports via the #shared alias, including direct and nested path imports.
  • Noted the addition of a new exported/public file: shared/types/bar.ts.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title "docs: remove d suffix in example" concisely and accurately summarises the primary documentation change (removing the .d.ts suffix from the shared imports example), so it is clear, specific and relevant to the changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Description Check ✅ Passed The PR description states that the shared imports example uses a *.d.ts file and that this is not recommended, which directly matches the documented changes to remove the .d.ts suffix and introduce a bar.ts example, so the description is on-topic and reflects the changeset.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/fix-d-ts-reference

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a 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.ts is discouraged here.

A one-liner will pre-empt questions: .d.ts files are for ambient declarations, aren’t transpiled, and can confuse tooling/auto‑imports; prefer .ts with export type/interface.

Apply after the directory block:

  -----| bar.ts             # Auto-imported

+::tip
+Prefer .ts over .d.ts in shared/types/. .d.ts files are for ambient declarations only and aren’t transpiled; using .ts with export type/interface plays better with editor tooling and Nuxt’s scanning.
+::
+
Any other files you create in the shared/ folder must be manually imported using the #shared alias (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 -->

@danielroe danielroe added this pull request to the merge queue Sep 22, 2025
@danielroe danielroe removed this pull request from the merge queue due to a manual request Sep 22, 2025
@danielroe danielroe merged commit ce727bc into main Sep 22, 2025
9 of 10 checks passed
@danielroe danielroe deleted the docs/fix-d-ts-reference branch September 22, 2025 19:32
@github-actions github-actions bot mentioned this pull request Sep 22, 2025
danielroe pushed a commit that referenced this pull request Sep 23, 2025
@github-actions github-actions bot mentioned this pull request Sep 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants