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

Update readme.md to include a note about dev mode install #851

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jpshackelford
Copy link

Quick update to the README for the question posted at #136 since I am least the second to newb to ask.

@@ -75,6 +75,13 @@ PR welcome for additional commonly needed types and docs improvements. Read the
npm install type-fest
```

<p>Or, for projects that do not export these or dependent types, install as a dev only dependency with: </p>
Copy link
Owner

Choose a reason for hiding this comment

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

This is not entirely accurate. The types don't need to be exported for it to need to be a dependency, and not dev dependency. Even if the types are used internally in a index.d.ts file (and not exported), type-fest needs to a dependency. Basically, if types included in a package use types from type-fest, type-fest needs to be a dependency.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Unless one explicitly add an ignore to the imports, then they become optional imports, see eg this helper of mine: https://github.com/voxpelli/ts-ignore-import

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

3 participants