I'm developing a node.js
script using typescript and in order to tsc
not to complain about non-browser-js code like require
or module.exports
, I have to include /// <reference path="lib/node.d.ts" />
in every file. To make things worse, the location to that file needs to be relative to the code file, so I can't easily put it to a template.
Is there a way to just tell tsc
that each file in a specified dir conforms to node definition?
No you don't. Just use a
tsconfig.json
file : https://github.com/TypeStrong/atom-typescript/blob/master/docs/tsconfig.md