efrt icon indicating copy to clipboard operation
efrt copied to clipboard

Are there plans to support Typescript

Open dkrutsko opened this issue 2 years ago • 2 comments

Have you considered adding Typescript types for this library to better support Typescript projects using this library?

dkrutsko avatar Apr 02 '23 07:04 dkrutsko

oh hey David, fellow Torontonian - yeah sure - I can put a types file in, or I'd welcome a pr cheers

spencermountain avatar Apr 03 '23 13:04 spencermountain

Awesome stuff, I'm still not too sure how the types are implemented on the library level, I'm guessing it's just a file? In the other PR I posted my version of the unpack function. I think for your current API it should be as simple as implementing two functions right? Something along the lines of:

pack (s: string[] | Record<string, string>): string
unpack (s: string): Record<string, string>

dkrutsko avatar Apr 03 '23 20:04 dkrutsko