This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 828
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Patch posthog's type definitions using patch-package
Remove definitions for sentry and rrweb-snapshot
- Loading branch information
Showing
3 changed files
with
159 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
diff --git a/node_modules/posthog-js/dist/module.d.ts b/node_modules/posthog-js/dist/module.d.ts | ||
index d3cba02..44826f6 100644 | ||
--- a/node_modules/posthog-js/dist/module.d.ts | ||
+++ b/node_modules/posthog-js/dist/module.d.ts | ||
@@ -1,7 +1,5 @@ | ||
// Type definitions for exported methods | ||
- | ||
-import { EventProcessor, Integration } from '@sentry/types' | ||
-import { MaskInputOptions, SlimDOMOptions } from 'rrweb-snapshot' | ||
+// Patched to remove references to sentry and rrweb-snapshot which aren't otherwise SDK dependencies | ||
|
||
declare class posthog { | ||
/** | ||
@@ -585,7 +583,6 @@ declare namespace posthog { | ||
request_batching?: boolean | ||
sanitize_properties?: (properties: posthog.Properties, event_name: string) => posthog.Properties | ||
properties_string_max_length?: number | ||
- session_recording?: SessionRecordingOptions | ||
mask_all_element_attributes?: boolean | ||
mask_all_text?: boolean | ||
advanced_disable_decide?: boolean | ||
@@ -618,17 +615,6 @@ declare namespace posthog { | ||
send_event: boolean | ||
} | ||
|
||
- interface SessionRecordingOptions { | ||
- blockClass?: string | RegExp | ||
- blockSelector?: string | ||
- ignoreClass?: string | ||
- maskAllInputs?: boolean | ||
- maskInputOptions?: MaskInputOptions | ||
- maskInputFn?: (text: string) => string | ||
- slimDOMOptions?: SlimDOMOptions | 'all' | true | ||
- collectFonts?: boolean | ||
- } | ||
- | ||
export class persistence { | ||
static properties(): posthog.Properties | ||
|
||
@@ -768,12 +754,6 @@ declare namespace posthog { | ||
export class feature_flags extends featureFlags {} | ||
} | ||
|
||
-export class SentryIntegration implements Integration { | ||
- constructor(posthog: posthog, organization?: string, projectId?: number, prefix?: string) | ||
- name: string | ||
- setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void): void | ||
-} | ||
- | ||
export type PostHog = typeof posthog | ||
|
||
export default posthog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters