Skip to content

Commit

Permalink
fix(types): Update to support new V7 transport style (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
liamjones committed Jul 28, 2022
1 parent ce7ba8c commit ebdb751
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
12 changes: 8 additions & 4 deletions browser.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,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 ebdb751

Please sign in to comment.