Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add typescript support - Part II #43

Open
jho406 opened this issue Apr 15, 2024 · 2 comments
Open

Add typescript support - Part II #43

jho406 opened this issue Apr 15, 2024 · 2 comments
Assignees
Labels
railsconf2024 Issues worked on during RailsConf 2024 Hack Day

Comments

@jho406
Copy link
Collaborator

jho406 commented Apr 15, 2024

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.

@stefannibrasil
Copy link
Contributor

This task can be broken down into:

1 - add TypeScript first
2 - then we should be good to work on the other tasks mentioned here

@jho406 jho406 changed the title Convert Superglue JS to typescript Convert Superglue JS to typescript - Part II May 3, 2024
@jho406 jho406 changed the title Convert Superglue JS to typescript - Part II Add typescript support - Part II May 3, 2024
@johncardiologs
Copy link

Hi! I prototyped adding Typescript at RailsConf 2024, PR here: #60

I've mostly been trying to follow this JS -> TS Migration guide -- still new to this!

@stefannibrasil stefannibrasil added the railsconf2024 Issues worked on during RailsConf 2024 Hack Day label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
railsconf2024 Issues worked on during RailsConf 2024 Hack Day
Projects
None yet
Development

No branches or pull requests

3 participants