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

Support for typescript #162

Closed
tedawf opened this issue Jun 2, 2023 · 3 comments
Closed

Support for typescript #162

tedawf opened this issue Jun 2, 2023 · 3 comments

Comments

@tedawf
Copy link

tedawf commented Jun 2, 2023

Although there is a types file merged in by PR #151

image

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

@jonkoops
Copy link
Collaborator

jonkoops commented Jun 2, 2023

You have an older version of flat installed, only version 6.0 has the types included.

@jonkoops jonkoops closed this as not planned Won't fix, can't repro, duplicate, stale Jun 2, 2023
@tedawf
Copy link
Author

tedawf commented Jun 2, 2023

That's strange. npm i flat doesn't install the latest v6? How would I get that version then?

@jonkoops
Copy link
Collaborator

jonkoops commented Jun 5, 2023

Not sure why, but you can always target the latest version by running npm install --save flat@latest.

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

No branches or pull requests

2 participants