Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export MockServerClient class' type using index.d.ts #174

Open
botflux opened this issue May 28, 2024 · 0 comments
Open

Export MockServerClient class' type using index.d.ts #174

botflux opened this issue May 28, 2024 · 0 comments

Comments

@botflux
Copy link

botflux commented May 28, 2024

Describe the feature request
Export the type MockServerClient through the main type file.

What you are trying to do
I'm writing test files in which I initialize a mockserver client in a before hook, like the following.

// The type `MockServerClient` is not exported by `mockserver-client`
import { mockServerClient, MockServerClient } from "mockserver-client"

let client!: MockServerClient

before(() => client = mockServerClient("localhost", 1080))

image

The solution you'd like

I would like the MockServerClient type to be exported by index.d.ts, so the precedent example can compile.

Describe alternatives you've considered

MockServerClient is currently available by importing "mockserver-client/mockServerClient" like the following:

import { mockServerClient } from "mockserver-client"
import { MockServerClient } from "mockserver-client/mockServerClient"

let client!: MockServerClient

before(() => client = mockServerClient("localhost", 1080))

I'm using the version 5.15.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant