Skip to content

Comments

fix: npm ci and typescript compilation errors#2

Open
lucinvitae wants to merge 1 commit intoAreo-Joe:feat/stdio-to-streamable-httpfrom
lucinvitae:feat/stdio-to-streamable-http
Open

fix: npm ci and typescript compilation errors#2
lucinvitae wants to merge 1 commit intoAreo-Joe:feat/stdio-to-streamable-httpfrom
lucinvitae:feat/stdio-to-streamable-http

Conversation

@lucinvitae
Copy link

Fixes issues found when running npm ci and typescript compilation errors for npm run build. e.g. output:

npm run build                                            

> supergateway@2.8.3 build
> tsc -p tsconfig.build.json

src/gateways/stdioToWs.ts:120:26 - error TS2345: Argument of type 'WebSocketServerTransport' is not assignable to parameter of type 'Transport'.
  Types of property 'send' are incompatible.
    Type '(msg: JSONRPCMessage, clientId?: string | undefined) => Promise<void>' is not assignable to type '(message: JSONRPCMessage, options?: TransportSendOptions | undefined) => Promise<void>'.
      Types of parameters 'clientId' and 'options' are incompatible.
        Type 'TransportSendOptions | undefined' is not assignable to type 'string | undefined'.
          Type 'TransportSendOptions' is not assignable to type 'string'.

120     await server.connect(wsTransport)
                             ~~~~~~~~~~~

src/server/websocket.ts:68:9 - error TS2416: Property 'send' in type 'WebSocketServerTransport' is not assignable to the same property in base type 'Transport'.
  Type '(msg: JSONRPCMessage, clientId?: string | undefined) => Promise<void>' is not assignable to type '(message: JSONRPCMessage, options?: TransportSendOptions | undefined) => Promise<void>'.
    Types of parameters 'clientId' and 'options' are incompatible.
      Type 'TransportSendOptions | undefined' is not assignable to type 'string | undefined'.
        Type 'TransportSendOptions' is not assignable to type 'string'.

68   async send(msg: JSONRPCMessage, clientId?: string): Promise<void> {
           ~~~~


Found 2 errors in 2 files.

Errors  Files
     1  src/gateways/stdioToWs.ts:120
     1  src/server/websocket.ts:68

@lucinvitae lucinvitae marked this pull request as ready for review June 4, 2025 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant