Is there a way to use Pulumi with Typescript v4? I...
# typescript
Is there a way to use Pulumi with Typescript v4? I would like to use newer TS features, such as
import type
You can use yarn resolutions or npm overrides to force a version of ts-node that supports a more recent typescript version
👍 1
Status so far: this will be work for Pulumi v4, given Typescript v4 has breaking changes.
@aloof-leather-66267 Just use Javascript & everything is solved 😄
(but srsly - I don’t like TS because it bloats
, slows down work because of the transpilation step, makes upgrades harder (you have to upgrade all TS dependencies), bloats Lambda functions etc. etc.) (I know that one of the Pulumi founders worked on TS, so that’s why Pulumi is forcing it, but sorry I just don’t find it that useful, if I want a strong/static typing system I’ll just use Go)
FYI, we aren’t forcing you to use Typescript. You can use any of our NPM packages without TypeScript at all. There are a number of Javascript only examples here: Search for
in the top level folder name.
@limited-rainbow-51650 sorry, wrong word, not
😄 (or some more softer word, sry English is not my native lang.)
coercing is still too strong of a word. They encourage TS but you have 100% freedom to use JS. There's no loss in features/support. Not all type systems are created equal though. Go's is (intentionally) very limited and not at all comparable to TS.
Then there is Go, Java, dotnet, python SDKs as well
@clean-football-9795 Yup, but I feel that vanilla Javascript/Node.js goes best with Pulumi, it’s very lightweight, flexible and expressive 🙂 On one of our biggest projects we properly set up the Pulumi projects with JS, and the Ops people loved it, as well as the Developers - it was awesome. (not to mention that we could write AWSLambdas (almost) seamlessly in the same codebase & they were extremely lightweight (<1kb most of the time). It was glorious :)