zivl / sentry-testkit

A Sentry plugin to allow Sentry report interception and further inspection of the data being sent
https://zivl.github.io/sentry-testkit/
MIT License
112 stars 26 forks source link

[Feature Request]: Return Typed `sentryTransport` function #142

Open zivl opened 2 years ago

zivl commented 2 years ago

Typed sentryTransport function

After the code base move to TypeScript, we got rid of the manual *.d.ts files which caused issues with the implicit returned type of sentryTransport function.

The main cause that we cannot use the straitforward retuned type is because we want to support multiple Sentry versions, and that results in multiple conflicted interfaces (some of them are breaking changes).

We need to come up with something we have done on our manual definition file back then:

  type V6TransportClass = {
    new (): Transport
  }

  type V7TransportFunction = () => Transport

But the above is also not straitforward for the TS compiler to digest (for some reason). For me personally, I'm a TypeScript newbe so I'm looking for the right solution here... any kind of help is welcomed!

github-actions[bot] commented 1 year ago

Stale issue message

github-actions[bot] commented 1 year ago

Stale issue message

github-actions[bot] commented 1 year ago

Stale issue message

github-actions[bot] commented 1 year ago

Stale issue message

github-actions[bot] commented 1 year ago

Stale issue message

github-actions[bot] commented 1 year ago

Stale issue message

github-actions[bot] commented 10 months ago

Stale issue message

github-actions[bot] commented 8 months ago

Stale issue message

github-actions[bot] commented 6 months ago

Stale issue message

github-actions[bot] commented 4 months ago

Stale issue message

github-actions[bot] commented 2 months ago

Stale issue message

github-actions[bot] commented 1 day ago

Stale issue message