UNPKG

1.76 kBTypeScriptView Raw
1import type { Client, Integration, IntegrationFn, Options } from '@sentry/types';
2declare module '@sentry/types' {
3 interface Integration {
4 isDefaultInstance?: boolean;
5 }
6}
7export declare const installedIntegrations: string[];
8/** Map of integrations assigned to a client */
9export type IntegrationIndex = {
10 [key: string]: Integration;
11};
12/** Gets integrations to install */
13export declare function getIntegrationsToSetup(options: Pick<Options, 'defaultIntegrations' | 'integrations'>): Integration[];
14/**
15 * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default
16 * integrations are added unless they were already provided before.
17 * @param integrations array of integration instances
18 * @param withDefault should enable default integrations
19 */
20export declare function setupIntegrations(client: Client, integrations: Integration[]): IntegrationIndex;
21/**
22 * Execute the `afterAllSetup` hooks of the given integrations.
23 */
24export declare function afterSetupIntegrations(client: Client, integrations: Integration[]): void;
25/** Setup a single integration. */
26export declare function setupIntegration(client: Client, integration: Integration, integrationIndex: IntegrationIndex): void;
27/** Add an integration to the current hub's client. */
28export declare function addIntegration(integration: Integration): void;
29/**
30 * Define an integration function that can be used to create an integration instance.
31 * Note that this by design hides the implementation details of the integration, as they are considered internal.
32 */
33export declare function defineIntegration<Fn extends IntegrationFn>(fn: Fn): (...args: Parameters<Fn>) => Integration;
34//# sourceMappingURL=integration.d.ts.map
\No newline at end of file