react-images icon indicating copy to clipboard operation
react-images copied to clipboard

No TS types in build

Open JClackett opened this issue 5 years ago • 6 comments

yarn add react-images

v1.1.0-beta.2

inspect node_modules/react-images, there are no types even though it references ./index.d.ts

JClackett avatar Jan 23 '20 12:01 JClackett

please can you release another version to NPM :)

JClackett avatar Jan 27 '20 17:01 JClackett

Can you check if it's present in v1.1.0-beta.3 which I just published?

Thanks!

davwheat avatar Jan 27 '20 17:01 davwheat

Still not there :(

All i have is this...

Screenshot 2020-01-27 at 18 56 01

Something with your publish step is not including all the files, potentially in your package.json you should include the declation file in the "files" array..

  "files": [
    "dist",
    "lib",
    "src",
    "index.d.ts"
  ],  

JClackett avatar Jan 27 '20 17:01 JClackett

Sorry! I've never done typings before so this is all brand new to me!

It seems it's already in there:

  "files": [
    "dist",
    "lib",
    "src",
    "./index.d.ts"
  ],

davwheat avatar Jan 27 '20 18:01 davwheat

FYI: My first instinct was to reach for @types/react-images ...but that only exports a Lightbox and Image (missing both Modal and ModalGateway)

doublejosh avatar Jan 29 '20 23:01 doublejosh

Believe I found it, the other entry in package.json...

SHOULD BE: "types": "index.d.ts", CURRENTLY: "types": "./index.d.ts",

doublejosh avatar Jan 29 '20 23:01 doublejosh