Skip to content

Commit 1666148

Browse files
author
Luca Forstner
committed
fix(types): Fix generic exports with default
1 parent fcd2935 commit 1666148

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

packages/types/src/index.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ export type FetchBreadcrumbHint = FetchBreadcrumbHint_imported;
205205
/** @deprecated This type has been moved to `@sentry/core`. */
206206
export type XhrBreadcrumbHint = XhrBreadcrumbHint_imported;
207207
/** @deprecated This type has been moved to `@sentry/core`. */
208-
export type Client = Client_imported;
208+
// eslint-disable-next-line deprecation/deprecation
209+
export type Client<O extends ClientOptions = ClientOptions<BaseTransportOptions>> = Client_imported<O>;
209210
/** @deprecated This type has been moved to `@sentry/core`. */
210211
export type ClientReport = ClientReport_imported;
211212
/** @deprecated This type has been moved to `@sentry/core`. */
@@ -322,7 +323,8 @@ export type Integration = Integration_imported;
322323
/** @deprecated This type has been moved to `@sentry/core`. */
323324
export type IntegrationClass<T> = IntegrationClass_imported<T>;
324325
/** @deprecated This type has been moved to `@sentry/core`. */
325-
export type IntegrationFn = IntegrationFn_imported;
326+
// eslint-disable-next-line deprecation/deprecation
327+
export type IntegrationFn<IntegrationType = Integration> = IntegrationFn_imported<IntegrationType>;
326328
/** @deprecated This type has been moved to `@sentry/core`. */
327329
export type Mechanism = Mechanism_imported;
328330
/** @deprecated This type has been moved to `@sentry/core`. */
@@ -334,9 +336,11 @@ export type Primitive = Primitive_imported;
334336
/** @deprecated This type has been moved to `@sentry/core`. */
335337
export type WorkerLocation = WorkerLocation_imported;
336338
/** @deprecated This type has been moved to `@sentry/core`. */
337-
export type ClientOptions = ClientOptions_imported;
339+
// eslint-disable-next-line deprecation/deprecation
340+
export type ClientOptions<TO extends BaseTransportOptions = BaseTransportOptions> = ClientOptions_imported<TO>;
338341
/** @deprecated This type has been moved to `@sentry/core`. */
339-
export type Options = Options_imported;
342+
// eslint-disable-next-line deprecation/deprecation
343+
export type Options<TO extends BaseTransportOptions = BaseTransportOptions> = Options_imported<TO>;
340344
/** @deprecated This type has been moved to `@sentry/core`. */
341345
export type Package = Package_imported;
342346
/** @deprecated This type has been moved to `@sentry/core`. */
@@ -511,7 +515,8 @@ export type WebFetchHeaders = WebFetchHeaders_imported;
511515
/** @deprecated This type has been moved to `@sentry/core`. */
512516
export type WebFetchRequest = WebFetchRequest_imported;
513517
/** @deprecated This type has been moved to `@sentry/core`. */
514-
export type WrappedFunction = WrappedFunction_imported;
518+
// eslint-disable-next-line @typescript-eslint/ban-types
519+
export type WrappedFunction<T extends Function = Function> = WrappedFunction_imported<T>;
515520
/** @deprecated This type has been moved to `@sentry/core`. */
516521
export type HandlerDataFetch = HandlerDataFetch_imported;
517522
/** @deprecated This type has been moved to `@sentry/core`. */

0 commit comments

Comments
 (0)