gnat / surreal

🗿 Mini jQuery alternative. Dependency-free animations. Locality of Behavior. Use one element or arrays transparently. Pairs with htmx. Vanilla querySelector() but better!
https://gnat.github.io/surreal/example.html
MIT License
1.2k stars 24 forks source link

feat(types): add surreal.d.ts declaration #41

Closed aretrace closed 2 weeks ago

aretrace commented 2 weeks ago

This might seem heterodoxical, but hear me out.

Sometimes client-side libraries are used in type aware environments (e.g., Astro in my case). Having type declarations make it much more ergonomic to work with such libraries, providing an alternative than just splattering @ts-ignore everywhere or exiting typescript altogether through @ts-nocheck.

I would like to have a declaration file for such cases, here is an example of one for surreal.

gnat commented 2 weeks ago

I cannot maintain this file, but you're more than welcome to make a surreal-ts repo (choose a good name) and we can link it in https://github.com/gnat/awesome-surreal so typescript users can find it easily.