We just tried to upgrade one of our projects to Ty...
# typescript
c
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
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
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
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
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