diff --git a/browser.d.ts b/browser.d.ts index f19ebc4..a69e460 100644 --- a/browser.d.ts +++ b/browser.d.ts @@ -6,6 +6,7 @@ import { StackFrame, Transport, } from '@sentry/types' +import { V6TransportClass, V7TransportFunction } from "./index"; export = sentryTestkit @@ -64,11 +65,15 @@ declare namespace sentryTestkit { isExist(e: Error): boolean } - export interface TestkitResult { + type V6TransportClass = { + new(): Transport + } + + type V7TransportFunction = () => Transport + + export interface TestkitResult { testkit: Testkit - sentryTransport: { - new (): Transport - } + sentryTransport: Transport initNetworkInterceptor( dsn: string, initCallback: ( diff --git a/index.d.ts b/index.d.ts index ac788e0..3536bd3 100644 --- a/index.d.ts +++ b/index.d.ts @@ -70,11 +70,15 @@ declare namespace sentryTestkit { getDsn: () => string } - export interface TestkitResult { + type V6TransportClass = { + new(): Transport + } + + type V7TransportFunction = () => Transport + + export interface TestkitResult { testkit: Testkit - sentryTransport: { - new (): Transport - } + sentryTransport: Transport initNetworkInterceptor( dsn: string, initCallback: (