You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The package.json files have a main field but are missing a types field, it prevents some editors (such as Jetbrains' Webstorm and Intellij) from picking the type declarations and providing autocompletion.
For example, for @actions/core, the package.json should look like this:
I found that the error was on my end, I was using the Typescript options allowSyntheticDefaultImports and esModuleInterop with default imports (instead of star imports) while the modules are marked as transpiled from Typescript. After switching to star imports, it works. It may still be a good thing to add the types field but it's less important.
Activity
demurgos commentedon Sep 19, 2019
I found that the error was on my end, I was using the Typescript options
allowSyntheticDefaultImportsandesModuleInteropwith default imports (instead of star imports) while the modules are marked as transpiled from Typescript. After switching to star imports, it works. It may still be a good thing to add thetypesfield but it's less important.bryanmacfarlane commentedon Sep 24, 2019
In addition actions should have dev dependency on types:
https://github.com/actions/javascript-action/blob/master/package.json#L26
But yeah, looks like a good thing to set per docs:
https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html
add: "types" to each package.json (#221)
add: "types" to each package.json (actions#221)