Q:

Is there a difference in requiring a json file in vscode?

I got a test1.ts file, it has only one line:
var x = require('./temp2.json')

this has no warning in VSCode, but when I have a similar code in test2.js:
var x = require('./temp2.json')

It trigger an warning: [js] can not find module './temp2.json', why?
btw checkJs is true in jsconfig.json

A:

This is a bug as of VS Code 1.16 / TypeScript 2.5. The issue is tracked here
There was a PR out for the parent issue however it has not been updated recently so I'm not aware of its status

