Answers for "how to import object from json file in typescript"

2

import json typescript

// add this in your tsconfig.json file:
{
  "compilerOptions": {
    "resolveJsonModule": true
  }
}
Posted by: Guest on October-01-2021
0

typescript read json file

import {default as a} from "config.json";
config.targetKey
// this requires `"resolveJsonModule": true` in tsconfig.json
Posted by: Guest on January-15-2021

Code answers related to "how to import object from json file in typescript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language