Closed
Description
TypeScript Version: 2.5.3 / next
Code
See a minimal repro at https://github.com/seikho/resolution-repro
Importing from module/sub-folder
returns a compiler error when no index.ts
is present despite a package.json
with a valid typings
property being present.
// Should work when node_modules/mod/mod-a contains a package.json with "typings" property
import { add } from 'mod/mod-a'
// A workaround will work however
import { add } from 'mod/mod-a/src'
Expected behavior:
Should compile okay
Actual behavior:
Fails to compile with error TS2307: Cannot find module 'mod/mod-a'