darekf77 / ng2-logger

Isomorphic logger for Browser and NodeJS, ( typescript / javascript ) apps
MIT License
61 stars 17 forks source link

Manual import of Log class #18

Closed alfupe closed 6 years ago

alfupe commented 7 years ago

Hi,

I don't know if this is an issue at all. Sorry if not.

Every time I use the Log class, i.e. Log.create('Component'); I need to manually import it: import { Log } from 'ng2-logger/ng2-logger';. I don't understand the reason why my IDE (PhpStorm) cannot autoimport this class as it does with all the other classes, components, models, services, etc.

Thanks!

darekf77 commented 7 years ago

Hi @alfupe, I will try to fix it in new version...

alfupe commented 7 years ago

Cool! Thank you!

codedoge commented 7 years ago

This is probably because the module is missing the index.d.ts, where the ts definitions are usually found, so you need to provide the filename where the definitions are.

darekf77 commented 7 years ago

In new version should be in index.d.ts and also import is like this now: import { Log } from 'ng2-logger'