Skip to content

Commit

Permalink
fix(types): Update to support new V7 transport style
Browse files Browse the repository at this point in the history
  • Loading branch information
liamjones committed Jul 27, 2022
1 parent ce7ba8c commit b7d9377
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
13 changes: 9 additions & 4 deletions browser.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
StackFrame,
Transport,
} from '@sentry/types'
import { V6TransportClass, V7TransportFunction } from "./index";

export = sentryTestkit

Expand Down Expand Up @@ -64,11 +65,15 @@ declare namespace sentryTestkit {
isExist(e: Error): boolean
}

export interface TestkitResult {
type V6TransportClass = {
new(): Transport
}

type V7TransportFunction = () => Transport

export interface TestkitResult<Transport extends V6TransportClass | V7TransportFunction> {
testkit: Testkit
sentryTransport: {
new (): Transport
}
sentryTransport: Transport
initNetworkInterceptor<T>(
dsn: string,
initCallback: (
Expand Down
12 changes: 8 additions & 4 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,15 @@ declare namespace sentryTestkit {
getDsn: () => string
}

export interface TestkitResult {
type V6TransportClass = {
new(): Transport
}

type V7TransportFunction = () => Transport

export interface TestkitResult<Transport extends V6TransportClass | V7TransportFunction> {
testkit: Testkit
sentryTransport: {
new (): Transport
}
sentryTransport: Transport
initNetworkInterceptor<T>(
dsn: string,
initCallback: (
Expand Down

0 comments on commit b7d9377

Please sign in to comment.