Is it possible to use .js files in a typescript project in vs code? I have clone a react-native project from a github repository and opened it in visual studio code. When I add a tsconfig.json in order to start using typescript, I get a long list of errors. For example here is a drawer.js file (with es6 features):
Here is my tsconfig.json file (If I remove this file then every thing works fine, no error reported) :
--allowJS
option that does exactly that:https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#including-js-files-with---allowjs
. The trick part however is for Visual Code to accept the files... I am not sure if it uses the values oftsconfig.json
for syntax checking. – martinarroyo