-
Notifications
You must be signed in to change notification settings - Fork 139
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
all: add typescript to backend #202
Conversation
Preview deployed to development environment: https://dashboard.prototypes.kube001.services.stellar-ops.com |
1 similar comment
Preview deployed to development environment: https://dashboard.prototypes.kube001.services.stellar-ops.com |
Preview deployed to development environment: https://dashboard.prototypes.kube001.services.stellar-ops.com |
1 similar comment
Preview deployed to development environment: https://dashboard.prototypes.kube001.services.stellar-ops.com |
Preview deployed to development environment: https://dashboard.prototypes.kube001.services.stellar-ops.com |
Preview deployed to development environment: https://dashboard.prototypes.kube001.services.stellar-ops.com |
@piyalbasu @quietbits (who I think may have an opinion on this) I played around with @babel/preset-typescript (which I'm guessing the frontend may use when it adds typescript) to compile the backend using webpack , but it wasn't trivial refactoring webpack to compile the backend too, so I decided to stick with |
This makes sense. Totally favor a simpler |
Preview deployed to development environment: https://dashboard.prototypes.kube001.services.stellar-ops.com |
Preview deployed to development environment: https://dashboard.prototypes.kube001.services.stellar-ops.com |
WHAT
add typescript support to the backend. For this PR just adding the initial typescript infra changes needed, following PRs will refactor the
backend/*.js
files to typescript.part of #197
WHY
using typescript with the typescript compiler will notify devs at compile time of type errors + reduce bugs. Also SDF js projects are primarily using typescript, so brings this project inline with our other ones.
note: for running the backend locally I chose to use
ts-node
, so that you can run it with one command and not have to create new files. But for production using thetsc
compiler +node
becausets-node
is advised not for production use.