chrisdavies / eev

A tiny, fast, zero-dependency event emitter
522 stars 32 forks source link

eev.d.ts is not picked up by TS compiler #13

Closed andrastothtw closed 5 years ago

andrastothtw commented 5 years ago

Hi!

My TS compilation breaks and asks me to install @types/eev. However, there is no such thing like that, because the ambient module declaration is right in the package. However, that is not picked up. That said there is a very simple fix: https://stackoverflow.com/questions/46650399/how-do-i-reference-a-type-declared-in-a-typescript-d-ts-file-generated-by-tscs?rq=1 You just need to reference eev.d.ts file in package.json:

{
  "main": "eev.js",
  "types": "eev.d.ts",
   "[...]": "[...]"
}
chrisdavies commented 5 years ago

Hm... I'm way behind on responding to any of my OSS GitHub projects. Sorry! It's a crazy time of life right now.

Just pushed the fix here: https://github.com/chrisdavies/eev/commit/42bea1544a49dc103e32eed482e2dab8803ec168

Should be addressed in the latest npm release.