flekschas/svelte-simple-modal

Add typescript definitions

NEO97online opened this issue · 3 comments

It would be great to have typescript definitions for the props on this component.

That would indeed be great and I am happy to merge a PR. Do you want to take a stab at fleshing out the type definitions?

I took a stab at it and generated type definitions with sveld. However, before I merge the change I'd like to ask you if you can give it a try by installing the following version. Are the types picked up as expected?

Install Instruction

  1. Download svelte-simple-modal-1.0.4.tgz.zip
  2. Unzip the package
    (I had to zip the tarball because GitHub does not allow uploads of .tgz files. However, .zip are allowed 🤷‍♂️)
  3. Go to a local repo that uses svelte-simple-modal
  4. Install the npm tarball: npm install path/to/the/downloaded/tarball/svelte-simple-modal-1.0.4.tgz

The <Modal /> should work as expected but you should have type annotations for all exports.

Addressed via #1b5bcd4 and published in v1.1.1.