harttle / liquidjs

A simple, expressive, safe and Shopify compatible template engine in pure JavaScript.
https://liquidjs.com
MIT License
1.5k stars 238 forks source link

Typescript types missing in v10.16.5 #741

Open theycallmeswift opened 3 weeks ago

theycallmeswift commented 3 weeks ago
TS7016: Could not find a declaration file for module 'liquidjs'. '/Users/theycallmeswift/dev/foo/node_modules/liquidjs/dist/liquid.node.mjs' implicitly has an 'any' type.
  Try `npm i --save-dev @types/liquidjs` if it exists or add a new declaration (.d.ts) file containing `declare module 'liquidjs';`

Works in 10.16.4, but breaks when the packages is upgraded. Likely related to the ESM changes.

harttle commented 3 weeks ago

I cannot reproduce using this project: https://github.com/harttle/liquidjs/tree/master/demo/typescript

Could you provide a runnable case, maybe a temporary repo, or create a PR to add a repo under /demo?

skorfmann commented 3 weeks ago

can confirm that the most recent version didn't have types, downgraded to 10.16.1 (the version I was using before) which worked. Don't have a case to reproduce unfortunately