TypeStrong / dts-bundle

Export TypeScript .d.ts files as an external module definition
MIT License
308 stars 57 forks source link

fix(commonjs dir imports) Fixes imports that specify directories only. #40

Closed kcjmowright closed 8 years ago

kcjmowright commented 8 years ago

If file is a directory then assume that what is meant is the index file in the directory.

Resolves Issue 38

kcjmowright commented 8 years ago

Found an issue with my fix where the module defined doesn't match the reference:

declare module 'fm-icons' {
    export * from 'fm-icons/application-object'; //<=  error TS2307: Cannot find module 'fm-icons/application-object'.

}

declare module 'fm-icons/application-object/index' {
  ...
}

Closing PR for now.