Support for typescript
tedawf opened this issue · comments
Ang Wei Feng (Ted) commented
Although there is a types file merged in by PR #151
But npm install flat
does not install the types definitions too? There is no index.d.ts in my flat module, causing this error message
Could not find a declaration file for module 'flat'. 'C:/Users/tedaw/dev/work/code/nftvue/node_modules/.pnpm/flat@5.0.2/node_modules/flat/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/flat` if it exists or add a new declaration (.d.ts) file containing `declare module 'flat';`
Am I installing this wrongly? Im using typescript and nextjs 13
Jon Koops commented
You have an older version of flat
installed, only version 6.0 has the types included.
Ang Wei Feng (Ted) commented
That's strange. npm i flat
doesn't install the latest v6? How would I get that version then?
Jon Koops commented
Not sure why, but you can always target the latest version by running npm install --save flat@latest
.