Skip to content

Commit 92ce807

Browse files
authored
fix(types): Fix generic exports with default (#14576)
1 parent d8bd0f5 commit 92ce807

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

packages/types/src/index.ts

+10-5
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ export type FetchBreadcrumbHint = FetchBreadcrumbHint_imported;
206206
/** @deprecated This type has been moved to `@sentry/core`. */
207207
export type XhrBreadcrumbHint = XhrBreadcrumbHint_imported;
208208
/** @deprecated This type has been moved to `@sentry/core`. */
209-
export type Client = Client_imported;
209+
// eslint-disable-next-line deprecation/deprecation
210+
export type Client<O extends ClientOptions = ClientOptions<BaseTransportOptions>> = Client_imported<O>;
210211
/** @deprecated This type has been moved to `@sentry/core`. */
211212
export type ClientReport = ClientReport_imported;
212213
/** @deprecated This type has been moved to `@sentry/core`. */
@@ -323,7 +324,8 @@ export type Integration = Integration_imported;
323324
/** @deprecated This type has been moved to `@sentry/core`. */
324325
export type IntegrationClass<T> = IntegrationClass_imported<T>;
325326
/** @deprecated This type has been moved to `@sentry/core`. */
326-
export type IntegrationFn = IntegrationFn_imported;
327+
// eslint-disable-next-line deprecation/deprecation
328+
export type IntegrationFn<IntegrationType = Integration> = IntegrationFn_imported<IntegrationType>;
327329
/** @deprecated This type has been moved to `@sentry/core`. */
328330
export type Mechanism = Mechanism_imported;
329331
/** @deprecated This type has been moved to `@sentry/core`. */
@@ -335,9 +337,11 @@ export type Primitive = Primitive_imported;
335337
/** @deprecated This type has been moved to `@sentry/core`. */
336338
export type WorkerLocation = WorkerLocation_imported;
337339
/** @deprecated This type has been moved to `@sentry/core`. */
338-
export type ClientOptions = ClientOptions_imported;
340+
// eslint-disable-next-line deprecation/deprecation
341+
export type ClientOptions<TO extends BaseTransportOptions = BaseTransportOptions> = ClientOptions_imported<TO>;
339342
/** @deprecated This type has been moved to `@sentry/core`. */
340-
export type Options = Options_imported;
343+
// eslint-disable-next-line deprecation/deprecation
344+
export type Options<TO extends BaseTransportOptions = BaseTransportOptions> = Options_imported<TO>;
341345
/** @deprecated This type has been moved to `@sentry/core`. */
342346
export type Package = Package_imported;
343347
/** @deprecated This type has been moved to `@sentry/core`. */
@@ -512,7 +516,8 @@ export type WebFetchHeaders = WebFetchHeaders_imported;
512516
/** @deprecated This type has been moved to `@sentry/core`. */
513517
export type WebFetchRequest = WebFetchRequest_imported;
514518
/** @deprecated This type has been moved to `@sentry/core`. */
515-
export type WrappedFunction = WrappedFunction_imported;
519+
// eslint-disable-next-line @typescript-eslint/ban-types
520+
export type WrappedFunction<T extends Function = Function> = WrappedFunction_imported<T>;
516521
/** @deprecated This type has been moved to `@sentry/core`. */
517522
export type HandlerDataFetch = HandlerDataFetch_imported;
518523
/** @deprecated This type has been moved to `@sentry/core`. */

0 commit comments

Comments
 (0)