Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

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

Closed
1 task done
MarkLodato opened this issue Dec 11, 2017 · 2 comments
Closed
1 task done

Comments

@MarkLodato
Copy link

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

  • package.json

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.

MarkLodato added a commit to MarkLodato/es6-tween that referenced this issue Dec 11, 2017
@Arlodotexe
Copy link

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

@dalisoft
Copy link
Collaborator

PR is welcome =)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants