You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(core): add explicit | undefined to Transport interface optional properties
Adds | undefined to optional properties on the Transport interface and
TransportSendOptions so the interface matches what tsc emits in .d.ts for
implementing classes. This fixes TS2420 errors for consumers using
exactOptionalPropertyTypes: true without skipLibCheck.
Fixes#1314
Add explicit `| undefined` to optional properties on the `Transport` interface and `TransportSendOptions` (`onclose`, `onerror`, `onmessage`, `sessionId`, `setProtocolVersion`, `setSupportedProtocolVersions`, `onresumptiontoken`).
6
+
7
+
This fixes TS2420 errors for consumers using `exactOptionalPropertyTypes: true` without `skipLibCheck`, where the emitted `.d.ts` for implementing classes included `| undefined` but the interface did not.
8
+
9
+
Workaround for older SDK versions: enable `skipLibCheck: true` in your tsconfig.
0 commit comments