OSDK minimum Typescript version

Is there anywhere I can find the minimum Typescript version corresponding to each version of the OSDK generator? The newer OSDK versions appear to use Typescript 5.x features and I’m trying to understand how far we can upgrade without breaking compatibility with Typescript 4.9.

Required typescript versions for OSDK generator versions:

  • 1.x should work with 4.9 and 5.x
  • 2.x should work with versions 5.5 and above (and may work on earlier versions of TS 5.x)

Thanks for the response here @eanderson

I should have been a little more precise here
– when we generate an OSDK with generator version 1.3.10, the resulting package has a transitive dependency on @osdk/gateway 2.4.1 (via @osdk/legacy-client), which requires Typescript 5.x.

So the error we get when we compile on Typescript 4.9 is from this transitive dependency that uses Typescript 5 features.

[build:typescript] Error: common/temp/node_modules/.pnpm/@osdk+gateway@2.4.1/node_modules/@osdk/gateway/build/cjs/generated/openapi/request/index.d.cts:1:1 - (TS1383) Only named exports may use 'export type'.
[build:typescript] Error: common/temp/node_modules/.pnpm/@osdk+gateway@2.4.1/node_modules/@osdk/gateway/build/cjs/public/types.d.cts:1:1 - (TS1383) Only named exports may use 'export type'.

Could the generator be updated to pin that dependency on an older revision that is compatible with Typescript 4.9?

Oh. Thank you for pointing that out. I’m 99% sure we do not rely on any features in that package being TS 5. I must have been overzealous in preparing for the 2.0 series. I’ll put in a fix today.

1 Like