[v2] Usage with TypeScript #2675
Labels
bug
An error in the Docusaurus core causing instability or issues with its execution
status: needs triage
This issue has not been triaged by maintainers
🐛 Bug Report
I'm struggling to get TypeScript working with v2. The exported functionality which comes out of the box has a number of issues which are getting flagged. My IDE also complains about these when using standard JS but I can disable the inspection.
To Reproduce
Rename
pages/index.js
toindex.tsx
.I'm getting import errors, such as:
TS2307: Cannot find module '@docusaurus/useDocusaurusContext'.
TS2307: Cannot find module '@theme/Layout'.
etc...
I can see within node_modules everything seems to be within the
@docusaurus
directory, but the exported types don't seem to be working.Can someone point in in the right direction? Happy to start some docs, but I'm not entirely sure where to start.
The text was updated successfully, but these errors were encountered: