Skip to content

Allow passing in a generic type for the client #76

Open
@razor-x

Description

@razor-x
  • Consumers who use seam.client would like to use https://www.npmjs.com/package/typed-axios-instance
  • 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'
import type { TypedAxios } from 'typed-axios-instance'

import type { Routes } from './routes.js'

const seam = new Seam() // create a new instance normally

type Client = TypedAxios<Routes>

const seamWithTypedRoutes = Seam.fromClient<Client>(seam.client)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions