Closed
Description
Hi there,
├ foo/
│ └ index.ts
└ bar/
└ index.ts
Assume you have the project structure above, and that you'd like to require the file foo/index.ts
, from file bar/index.ts
.
With the current version of TypeScript you must use the
import foo = require('../foo/index')
CommonJS-based environments like node
and browserify
allow you to omit the index
part, and use just require('../foo')
. I think it would make sense for the typescript compiler to also allow that. (Considering it does look for index.ts
in global external modules)
Thanks