Skip to content

Conversation

@rekmarks
Copy link
Member

@rekmarks rekmarks commented Oct 1, 2025

Adds a section explaining when you should list a type-only dependency as a dev vs. prod dependency. Also opportunistically fixes header hierarchy in TypeScript docs.


Note

Adds a new "Type-Only Dependencies" section and normalizes heading hierarchy in docs/typescript.md.

  • Docs (TypeScript Guidelines):
    • New Section: Adds "Type-Only Dependencies" explaining when a type-only import should be a dev vs. prod dependency, with link to the TypeScript handbook.
    • Heading Hierarchy: Promotes multiple subheadings from #### to ### for consistency across Generic Types, Interfaces, Enums, and Functions sections.

Written by Cursor Bugbot for commit 5822978. This will update automatically on new commits. Configure here.

@rekmarks rekmarks requested a review from a team as a code owner October 1, 2025 22:38
### Type-Only Dependencies
If package `a` imports only types from `b`, `b` be a dev or production dependency of `a`?
Copy link

Choose a reason for hiding this comment

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

Suggested change
If package `a` imports only types from `b`, `b` be a dev or production dependency of `a`?
If package `a` imports only types from package `b`, should `b` be a dev or production dependency of `a`?

Copy link
Member Author

Choose a reason for hiding this comment

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

Going with @mcmire under the logic that it's clear from the context that b is a package.

Co-authored-by: Elliot Winkler <[email protected]>
@rekmarks rekmarks enabled auto-merge (squash) October 2, 2025 00:27
@MajorLift
Copy link
Contributor

Linking for reference:

@MajorLift
Copy link
Contributor

The current header hierarchy was intended to keep guideline entries consistently at H4, and to leave room for sections to be organized with H3 sub-headings (as e.g. Types already is).

The entries that have been promoted to H3 are now at the same level as sub-chapter headers e.g. Type Inference. Could this be potentially confusing for readers and future editors? Not necessarily opposed to the change, as it is in keeping with markdown lint rules.

Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

LGTM!

@rekmarks rekmarks merged commit 2cf4a41 into main Oct 2, 2025
8 checks passed
@rekmarks rekmarks deleted the rekm/type-only-dependencies branch October 2, 2025 13:06
@rekmarks
Copy link
Member Author

rekmarks commented Oct 2, 2025

@MajorLift I think it's aesthetically frustrating more than anything else, but happy to revert if anyone feels strongly about it.

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.

5 participants