Pārlūkot izejas kodu

fix: resolve TypeScript errors in SDK and Slack package

Dax Raad 4 mēneši atpakaļ
vecāks
revīzija
48057c2c21

+ 1 - 1
packages/sdk/js/src/gen/client/client.gen.ts

@@ -184,7 +184,7 @@ export const createClient = (config: Config = {}): Client => {
       const { opts, url } = await beforeRequest(options)
       return createSseClient({
         ...opts,
-        body: opts.body as BodyInit | null | undefined,
+        body: opts.body as any,
         headers: opts.headers as unknown as Record<string, string>,
         method,
         url,

+ 1 - 1
packages/sdk/js/src/server.ts

@@ -51,7 +51,7 @@ export async function createOpencodeServer(options?: ServerOptions) {
             throw new Error(`Failed to parse server url from output: ${line}`)
           }
           clearTimeout(id)
-          resolve(match[1])
+          resolve(match[1]!)
           return
         }
       }