Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ export class GeneratedDefaultWebsocketImplementation implements GeneratedWebsock
const typeNode = queryParameter.allowMultiple
? ts.factory.createUnionTypeNode([
type.typeNodeWithoutUndefined,
ts.factory.createArrayTypeNode(type.typeNodeWithoutUndefined)
ts.factory.createArrayTypeNode(type.typeNodeWithoutUndefined),
ts.factory.createKeywordTypeNode(ts.SyntaxKind.UndefinedKeyword)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

um I guess this works? Should we instead be keying off of whether this allows undefined?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point—updated to only include undefined in the union when the query parameter's value type is optional per context.type.isOptional(...). This gives us:

  • Non-optional, allow-multiple: foo: T | T[]
  • Optional, allow-multiple: foo?: T | T[] | undefined

])
: type.typeNodeWithoutUndefined;
return {
Expand Down
8 changes: 8 additions & 0 deletions generators/typescript/sdk/versions.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# yaml-language-server: $schema=../../../fern-versions-yml.schema.json
- version: 3.35.10
changelogEntry:
- summary: |
Update WebSocket `ConnectArgs` interface to type `allow-multiple: true` query parameters as `T | T[] | undefined` instead of `T | T[]` for consistency.
type: fix
createdAt: "2025-12-05"
irVersion: 62

- version: 3.35.9
changelogEntry:
- summary: |
Expand Down
Loading