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

typescript does not find declarations #2050

Closed
wants to merge 1 commit into from

Conversation

aanation
Copy link
Contributor

@aanation aanation commented Dec 6, 2021

In this commit you changed the "main" option in package.json.

For this reason, the package in the develop branch does not work (typescript in my project does't know where to take the declarations, and tries to compile the .ts files from the src directory).
Your comment says "Resetting package fields for development". Are you sure you haven't forgotten about it?
Maybe we should add types/typings section in the develop branch?

I am worried that this change will be released into the npm package


This PR currently has no changelog labels, so will not be included in changelogs.

A reviewer can add one of: T-Deprecation, T-Enhancement, T-Defect, T-Task to indicate what type of change this is, or add Type: [enhancement/defect/task] to the description and I'll add them for you.

@aanation aanation requested a review from a team as a code owner December 6, 2021 13:57
@dbkr
Copy link
Member

dbkr commented Dec 6, 2021

This is done automatically by the release script (adds it for the the release then removes it again for development) so that, on the develop branch, the default entry point is the typescript version and the types come directly from the source rather than from built types. It's far from an ideal solution, but yes, it is intentional.

@aanation
Copy link
Contributor Author

aanation commented Dec 6, 2021

This is done automatically by the release script (adds it for the the release then removes it again for development) so that, on the develop branch, the default entry point is the typescript version and the types come directly from the source rather than from built types. It's far from an ideal solution, but yes, it is intentional.

Okay, that makes me feel better :)
However, what prevents you from using the d.ts in the development environment instead of sources?

And another question, if we're talking about declarations. Have you thought about generating single file d.ts + one bundle .js file?

@t3chguy
Copy link
Member

t3chguy commented Dec 6, 2021

However, what prevents you from using the d.ts in the development environment instead of sources?

Having to run tsc in watch mode as a separate process rather than doing everything in a single webpack

Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

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

marking as reviewed while the change is discussed.

@MadLittleMods MadLittleMods added the Z-Community-PR Issue is solved by a community member's PR label Jun 2, 2022
@richvdh
Copy link
Member

richvdh commented Oct 3, 2024

superceded by #4357 I think

@richvdh richvdh closed this Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Z-Community-PR Issue is solved by a community member's PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants