danalloway / react-country-flag

React component for emoji/svg country flags.
https://danalloway.github.io/react-country-flag/
MIT License
255 stars 43 forks source link

Add TypeScript and generate declaration files #31

Closed thibaultboursier closed 4 years ago

thibaultboursier commented 4 years ago

Description

By adding TypeScript, we secure the code and allow the generation of declaration files dynamically.

👉 Rather than having a declaration file manually written, it will be generated each time project is built.

What I did:

Capture d’écran 2020-07-30 à 00 44 31
alexfrancavilla commented 4 years ago

@thibaultboursier @danalloway Any information on why this PR was closed? The diff looks pretty good and having Typescript declarations are important for many projects (as seen in #16).

thibaultboursier commented 4 years ago

Hello @alexfrancavilla, I closed it because @danalloway prefered static types file: https://github.com/danalloway/react-country-flag/issues/16#issuecomment-668294817 Anyway, it works fine with this PR. Maybe @danalloway could consider it again ;-) ?

forgowhisky commented 2 years ago

Hello @alexfrancavilla, I closed it because @danalloway prefered static types file: #16 (comment) Anyway, it works fine with this PR. Maybe @danalloway could consider it again ;-) ?

a year later, still waiting on a types file so I can use this in my ts project!

thibaultboursier commented 2 years ago

@forgowhisky I could create a fork of this project and publish it with types.