Start a team blog
Start a team blog, invite your team, and start 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?