From a4941ca3e981db327dfea206b6033504d50e9e52 Mon Sep 17 00:00:00 2001 From: Michael Matloka Date: Fri, 12 Mar 2021 18:43:49 +0100 Subject: [PATCH] Fix SentryIntegration optional param typing (#203) --- src/module.d.ts | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/module.d.ts b/src/module.d.ts index 16e63b0e1..6662260ac 100644 --- a/src/module.d.ts +++ b/src/module.d.ts @@ -452,23 +452,23 @@ declare class posthog { static onFeatureFlags(callback: (flags: string[]) => void): false | undefined /** - * Integrate Sentry with PostHog. This will add a direct link to the person in Sentry, and an $exception event in PostHog - * - * ### Usage - * - * Sentry.init({ - * dsn: 'https://example', - * integrations: [ - * new posthog.SentryIntegration(posthog) - * ] - * }) - * - * @param {Object} [posthog] The posthog object - * @param {string} [organization] Optional: The Sentry organization, used to send a direct link from PostHog to Sentry - * @param {Number} [projectId] Optional: The Sentry project id, used to send a direct link from PostHog to Sentry - * @param {string} [prefix] Optional: Url of a self-hosted sentry instance (default: https://sentry.io/organizations/) + * Integrate Sentry with PostHog. This will add a direct link to the person in Sentry, and an $exception event in PostHog + * + * ### Usage + * + * Sentry.init({ + * dsn: 'https://example', + * integrations: [ + * new posthog.SentryIntegration(posthog) + * ] + * }) + * + * @param {Object} [posthog] The posthog object + * @param {string} [organization] Optional: The Sentry organization, used to send a direct link from PostHog to Sentry + * @param {Number} [projectId] Optional: The Sentry project id, used to send a direct link from PostHog to Sentry + * @param {string} [prefix] Optional: Url of a self-hosted sentry instance (default: https://sentry.io/organizations/) */ - static SentryIntegration(posthog: posthog, organization: string, projectId: number, prefix: string): void + static SentryIntegration(posthog: posthog, organization?: string, projectId?: number, prefix?: string): void static toString(): string