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

Type generation from zodern:types no longer working #116

Open
harveysanders opened this issue Nov 18, 2024 · 0 comments · May be fixed by #117
Open

Type generation from zodern:types no longer working #116

harveysanders opened this issue Nov 18, 2024 · 0 comments · May be fixed by #117

Comments

@harveysanders
Copy link

I'm having an issue:

In the following commit, the zodern:types dependency was removed from package.onUse.
931d481

This had an unintended side effect of removing the TypeScript definition file for package assets and breaking the types:
image

File '[project-directory]/.meteor/local/types/packages.d.ts' is not a module.ts(2306)

From @zodern in Meteor Slack:

"If a package has a dependency on zodern:types, then all of the files needed for the types will be included when the package is published. However, this doesn’t happen when zodern:types is a weak dependency."

I have a suggestion:

The meteor/mongo package has a similar issue.
meteor/meteor#13447
The fix is to add the type definition file back to the package. This can be done by adding the following line to the package.js file:

api.addFiles('types/index.d.ts', ['client', 'server']);

Here's the fix from meteor/mongo:
meteor/meteor@ecdfb48

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 a pull request may close this issue.

1 participant