Answers for "import json typescript"


Cannot find module './data.json'. Consider using '--resolveJsonModule' to import module with '.json' extension

add to tsconfig.json

    "resolveJsonModule": true
Posted by: Guest on July-30-2020

import json typescript

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

how to import a json string from a file in typescript

import {default as a} from "a.json";
Posted by: Guest on June-16-2020

Code answers related to "import json typescript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language