Unable to use requireJS and Node's Require in the same TypeScript project
问题 I have a typescript project targeted at both Node and the browser. I'm using Node's require() in some scripts and requireJS's require() in others. My project directory looks like this: myProject \-- a.ts \-- b.ts \-- node.d.ts \-- require.d.ts where a.ts contains: /// <reference path="./node.d.ts" /> var cp = require('child-process'); var a = 'hello world' export = a and b.ts contains: /// <reference path="./require.d.ts" /> require('hello',function(x){console.log('world')}); var b = 'hello