This message was deleted.
s
This message was deleted.
m
TypeScript has been a wonderful experience for our team. We catch code issues earlier, even if it's not doing runtime typing, the transplied javascript is more reliable than just javascript, even if you have 100% test coverage.
3
m
typescript works well when you have defined interface types, especially for external APIs
really easy to use crosswalk to set up lambda apis that talk to popular services (like Github, which has types for it's API)
2
tbh ts doesn't create a lot of bloat here because you don't have to worry about JSX, webpack, etc, pretty much everything works out of box w/ a default tsconfig
2
m
Pulumi provides its own interpreter for typescript, so you don't need to install typescript as a dependencies. You can continue to write your applications in javascript, but you're missing out.
1
l
Also typescript in Pulumi does not imply typescript in the lambdas that Pulumi deploys. Separate code.
r
@little-cartoon-10569 Ahhh that’s a good one! Do you have any links that explain how this can be achieved? Thanks 🙂
m
The Pulumi
index.ts
declares your resources, and with some magic functions, it can also package up your apps to deploy to those resources. Your build process doesn't have to be coupled with Pulumi, or even exist. Javascript doesn't need to be "built" assuming you don't have dependencies, but even if you did, it's about telling the Pulumi plan where your artifacts that get deployed to your resources are. Examples: • https://github.com/pulumi/examples/tree/master/aws-ts-lambda-thumbnailer (js in a docker runtime for lambda) • https://github.com/pulumi/examples/tree/master/aws-ts-voting-app (python app to ecs) • https://github.com/pulumi/examples/blob/master/aws-ts-apigateway/index.ts#L23-L49 (js in lambda via Pulumi magic)