tweenjs / es6-tween

ES6 version of tween.js
MIT License
186 stars 34 forks source link

Typescript cannot find declaration file (.d.ts) when used via npm #46

Closed MarkLodato closed 6 years ago

MarkLodato commented 6 years ago

Issue

Issue name

Typescript cannot find declaration file (.d.ts) when used via npm

Issue description

When one tries to import es6-tween in TypeScript, they get:

ERROR in [at-loader] ./lib/graphics.ts:7:24 
    TS7016: Could not find a declaration file for module 'es6-tween'. '[...]/node_modules/es6-tween/full/Tween.js' implicitly has an 'any' type.
  Try `npm install @types/es6-tween` if it exists or add a new declaration (.d.ts) file containing `declare module 'es6-tween';`

Related

This issue is related to

What you excepted?

To fix, you simply need to add a "types" field in package.json. See http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html.

I'll send a pull request.

Arlodotexe commented 4 years ago

I'm seeing this issue again. Looks like there used to be TS definitions here, but they no longer exist.

dalisoft commented 4 years ago

PR is welcome =)