This message was deleted.
# typescript
s
This message was deleted.
s
you can simply
import yourFile from "./yourFile.json"
which will allow you to use it as an (implicitly typed) variable make sure in your tsconfig you have this enabled:
Copy code
{
  "compilerOptions": {
    "resolveJsonModule": true
    ...
c
works like a charm, and was something I've been trying the whole time, but people skipped over the tsconfig
👍 1