thiagobustamante / typescript-ioc

A Lightweight annotation-based dependency injection container for typescript.
MIT License
526 stars 64 forks source link

Could not find a declaration file for module 'typescript-ioc/es5' #42

Closed rainmanhhh closed 4 years ago

rainmanhhh commented 6 years ago

import {Inject, AutoWired} from 'typescript-ioc/es5'

webstorm report error: TS7016: Could not find a declaration file for module 'typescript-ioc/es5'

soleshot commented 5 years ago

I had the same issue; ended up leaving the import statement alone to make typescript happy

import {Inject, AutoWired} from 'typescript-ioc'

and then adding an alias to your resolver (i.e. webpack config resolve alias for me) resolve: { alias: { "typescript-ioc": path.resolve("node_modules/typescript-ioc/es5.js") } }

thiagobustamante commented 4 years ago

After version 2, this library does not support es5 anymore, so we don't have this kind of imports