Closed aSemy closed 2 years ago
I think the types
field is meant to provide types if you have a javascript npm package (with a main.js
), so typescript knows about the types when you import "package"
. typed-factorio has no executable files, so types
wouldn't be appropriate.
Out of curiosity, what tool are you trying to use? There might be another way to specify types.
I wanted to try Dukat, along with Gradle https://github.com/Kotlin/dukat. I've managed to manually specify the typed-factorio .d.ts
files before, but it's automatic if package.json
has types
defined :)
A kotlin-typescript-lua pipeline? interesting...
I'm not sure dukat currently supports "global" declarations as typed-factorio does, however we can try it anyways. I've just released version 0.11.0-packagetypes-1
which adds the types field. Let me know how it goes. If it works well I'll add it to the main versions as well.
Closing due to inactivity.
If the experiment above shows promise, I'll reopen this issue.
I wanted to try and use another tool to utilise the typed-factorio
.d.ts
files, but this requires thatpackage.json
has atypes
(ortypings
) field defined.For example, TypeScriptToLua's
package.json
has:The
types
field requires a single file of all the types. I see there'styped-factorio/runtime/index.d.ts
, but as this references files from libraries, this might not be suitable? This task might require a specificindex.d.ts
file that only references typed-factorio files?Thanks!