NathanWalker / ng2-image-lazy-load

Angular2 image lazy loader library.
http://nathanwalker.github.io/ng2-image-lazy-load
MIT License
160 stars 36 forks source link

Missing declaration file (image-lazy-load.service.d.ts) #13

Closed fetchandadd closed 8 years ago

fetchandadd commented 8 years ago

After I installed ng2-image-lazy-load my typescript compilation failed:

[10:20:16] Starting 'compile:ts'...
[...]/node_modules/ng2-image-lazy-load/index.d.ts(2,15): error TS2307: Cannot find module './src/app/services/image-lazy-load.service'. undefined
[...]/node_modules/ng2-image-lazy-load/src/app/directives/image-lazy-load.directive.d.ts(4,62): error TS2307: Cannot find module '../services/image-lazy-load.service'. undefined
[10:20:20] TypeScript: 2 semantic errors

After a deeper look insight the 'src/app/services'-folder of ng2-image-lazy-load I noticed that there isn't a image-lazy-load.service.d.ts-file.

I'm not sure if this is a mistake on my part or the missing declaration file is the reason. But after writing and adding the image-lazy-load.service.d.ts-file by myself locally the compilation succeeded.

npm --version: 3.7.3 node --version: 5.9.1

tsconfig.json

  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "moduleResolution": "node",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "removeComments": false,
    "noImplicitAny": true,
    "suppressImplicitAnyIndexErrors": true,
    "outDir": "public/dist"
  },
jinder commented 8 years ago

Also seeing this issue with the NPM package.

ksprwhite commented 8 years ago

Same issue

stefanfr commented 8 years ago

Same here

digitalkaoz commented 8 years ago

@timtegeler would you mind to provide a PR then?

fetchandadd commented 8 years ago

ok i will provide a PR tomorrow

NathanWalker commented 8 years ago

A PR would be appreciated. I won't get a chance to fix this til Monday.

digitalkaoz commented 8 years ago

See the linked PR

fetchandadd commented 8 years ago

If further contribution is necessary let me know

NathanWalker commented 8 years ago

Published with 2.0.8 now.