PostHog / posthog-js

Send usage data from your web app or site to PostHog, with autocapture.
https://posthog.com/docs/libraries/js
Other
299 stars 125 forks source link

feat: type safe posthog extensions #1407

Closed pauldambra closed 1 month ago

pauldambra commented 2 months ago

We keep adding more and more things directly to window We get no type help from TS And we're not being super unique with naming so could easily clash with someone else

Let's be a little more explicit about where and what we add to the window

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
posthog-js ✅ Ready (Inspect) Visit Preview Sep 19, 2024 10:12am
github-actions[bot] commented 2 months ago

Size Change: +4.42 kB (+0.36%)

Total Size: 1.22 MB

Filename Size Change
dist/array.full.js 349 kB +1.32 kB (+0.38%)
dist/array.js 164 kB +786 B (+0.48%)
dist/exception-autocapture.js 10.5 kB +145 B (+1.4%)
dist/main.js 165 kB +786 B (+0.48%)
dist/module.js 164 kB +786 B (+0.48%)
dist/recorder-v2.js 111 kB +227 B (+0.21%)
dist/recorder.js 111 kB +227 B (+0.21%)
dist/surveys.js 66 kB +38 B (+0.06%)
dist/tracing-headers.js 8.36 kB +104 B (+1.26%)
ℹ️ View Unchanged | Filename | Size | | :--- | :---: | | `dist/surveys-preview.js` | 59.8 kB | | `dist/web-vitals.js` | 10.3 kB |

compressed-size-action