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
Supporting typed-axios-instance directly in this library is out of scope.
Instead, the SeamHttp class could provide setting the client type via 'fromClient`, e.g.,
import{SeamHttp}from'@seamapi/http'importtype{TypedAxios}from'typed-axios-instance'importtype{Routes}from'./routes.js'constseam=newSeam()// create a new instance normallytypeClient=TypedAxios<Routes>constseamWithTypedRoutes=Seam.fromClient<Client>(seam.client)
The text was updated successfully, but these errors were encountered:
Reviewing this again, I don't feel the generic parameter is the correct solution. We should just be able to respect the type of the client passed to fromClient, e.g., does this work?
import{SeamHttp}from'@seamapi/http'importtype{TypedAxios}from'typed-axios-instance'importtype{Routes}from'./routes.js'constseam=newSeam()// create a new instance normallytypeClient=TypedAxios<Routes>constseamWithTypedRoutes=Seam.fromClient(seam.clientasClient)
seam.client
would like to use https://www.npmjs.com/package/typed-axios-instanceThe text was updated successfully, but these errors were encountered: