My Feed
Create Team Blog
Let's kick off a fresh team blog! Bring on the crew and let's get to publishing.

How to use a JSON file in TypeScript?

Reza Razavipour's photo
Reza Razavipour
·Dec 29, 2016

I have a file called men.json. I want to do the equivalent of var men = require('./men.json');

Whatever I have tried, it is looking for a ./men.json.js file. I read that I can not use import since it is not a .ts file

What is the equivalent of the require line?