superglue icon indicating copy to clipboard operation
superglue copied to clipboard

Add typescript support - Part II

Open jho406 opened this issue 1 year ago • 2 comments

All of superglue is written in ES6. For developers working with React, typescript has been a valuable tool to have. It would improve the developer experience if superglue was converted to Typescript.

In this story, we should add type annotations to every function in superglue and move from gradual typing to something a bit more strict.

Thoughts

Not all features of superglue can be converted to typescript.

  1. digging is a feature that make it easy to create medium effort interactivity, but it works off of key paths (http://xyz.com/posts/?props_at=header.notifications)
  2. Superglue also comes with UJS helpers, for example: using placeholders. Not sure what the best way to type this is.

Regardless, typing what we can is still a great step forward.

jho406 avatar Apr 15 '24 22:04 jho406