https://pulumi.com logo
#typescript
Title
# typescript
c

curved-pharmacist-41509

09/06/2021, 7:55 AM
We just tried to upgrade one of our projects to TypeScript 4.4 to get access to the aliased type narrowing and we can’t due to the
useUnknownInCatchVariables
option not existing in 3.7. We also can’t just alias our errors as any for now because TypeScript 3.7 errors with
Catch clause variable cannot have a type annotation.
Any plans to upgrade typescript, or just use the version installed in the project
g

great-queen-39697

09/07/2021, 9:32 PM
We're aware and working on upgrading the Typescript version. It looks like the newer versions of ts-node, the package we're using, dropped the caching ability, leading to a performance regression. More details here: https://github.com/pulumi/pulumi/issues/4876
c

curved-pharmacist-41509

09/08/2021, 3:05 PM
Thanks for that, got some ideas and happy to go throw some prototypes together for ways to move forward. Will need a bit of help though with what's going wrong
Have dropped a comment into that issue
g

great-queen-39697

09/08/2021, 4:35 PM
You're welcome! The other option if you're needing to get moving with what you have while we're working through it is compiling to JavaScript on your own and disabling the built-in support with https://www.pulumi.com/docs/intro/languages/javascript/#disabling-built-in-typescript-support. The actual definition of the TS version is here in case it helps! https://github.com/pulumi/pulumi/blob/master/sdk/nodejs/package.json#L25
c

curved-pharmacist-41509

09/09/2021, 7:17 AM
The other option if you’re needing to get moving with what you have while we’re working through it is compiling to JavaScript on your own and disabling the built-in support with
Yeah, this is what I was trying to do with esbuild - but I get strange errors from the pulumi runtime. I assume the generated JS is causing issues and just not sure how to debug