chromakode / react-html-email

Create elegant HTML email templates using React.
MIT License
896 stars 115 forks source link

Added basic typings for typescript #48

Open lordnox opened 6 years ago

lordnox commented 6 years ago

These are just the basics to have typescript not complain about missing untyped module.

I sadly don't have enough time to finish the types correctly, may be I'll find time later in the week.

See: #41

Thank you for this module!

codecov-io commented 6 years ago

Codecov Report

Merging #48 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #48   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          12     12           
  Lines          65     65           
  Branches       13     13           
=====================================
  Hits           65     65
Impacted Files Coverage Δ
src/index.js 100% <ø> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 42d6bd7...fd6e927. Read the comment docs.

ericwooley commented 4 years ago

So... I guess this didn't quite make the merge?

saiichihashimoto commented 3 years ago

@lordnox, are you able to move this into https://github.com/DefinitelyTyped/DefinitelyTyped? Development on this repo seems dead but usage is pretty high, so that seems like the only way to accomplish this.

lordnox commented 3 years ago

@saiichihashimoto I am actually not using this anymore either.

If there is interest you could move it yourself, however I think I would be best if someone takes over this project, maybe a fork, I'd push this change to the new repository then.

saiichihashimoto commented 3 years ago

I see. I don't really have time to get into this (especially with the high barrier to entry for DefinitelyTyped changes), so I'll leave this for someone else.

saiichihashimoto commented 3 years ago

One more appeal to @chromakode before abandoning this.

chromakode commented 3 years ago

Hi @saiichihashimoto and @lordnox. Sorry for the slow response on this -- I don't currently have bandwidth to maintain this library. In my opinion, these typings are not complete enough to merit inclusion, due to the use of the any type. I would want to see a complete translation of the PropTypes in each component (example) into TypeScript typings.

That being said, there are other reasons why I think that starting a project with react-html-email in 2021 would be inadvisable -- such as use of PropTypes, the reliance on module global configuration, and the lack of extensibility when compared to modern component libraries based on emotion and styled-components. Modernizing this codebase would not be a ton of work, but it is not a priority for me right now. I have updated this repo to note that it is no longer maintained. If you're interested in taking that on, I'd be happy to help.