sdk-typescript
sdk-typescript copied to clipboard
Incompatible with allowSyntheticDefaultImports set to false
Your tsconfig.json seems to have allowSyntheticDefaultImports and esModuleInterop set to true. This makes TypeScript throw errors when using the SDK in a project that has decided to not use these legacy support flags any more.
We were able to work around this with very small patches to your code, e.g. use import * as webpack from 'webpack'; instead of import webpack from 'webpack';, so I believe it would be easy and helpful if you would disable these flags in the SDK as well.
Seems like this got resolved. Thanks!
This is again broken in the @temporalio/testing package:
node_modules/@temporalio/testing/lib/index.d.ts:12:8 - error TS1259: Module '"node:events"' can only be default-imported using the 'allowSyntheticDefaultImports' flag
12 import events from 'node:events';
~~~~~~
node_modules/@types/node/events.d.ts:752:5
752 export = events;
~~~~~~~~~~~~~~~~
This module is declared with 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag.