You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please detail the following items when filing a feature request:
Wanted to request that the generated Analytics object would include typed methods for more than just the "track" event.
Ideally, we'd be able to use this as a typesafe wrapper around the whole segment api.
For instance, an example usage from our codebase (simplified):
// track is an initialized generated analytics client
window.analytics.identify({
'ab-test-variation': Cookies.get('ab-test-variation') || 'no-cookie',
});
track.variationViewed({
'ab-test-variation': Cookies.get('ab-test-variation'),
});
Ideally instead of "window.analytics" we could always just use a generated client with typesafe args.
In the ideal case, it would probably include a schema for the (in this instance) identify call. But even a loose typescript type like {[key: string]: any} would be nice.
Also, thanks for this library! It's fantastic, it's not that often that there is an immediate "I wish this existed", "oh my gosh it does" event.
The text was updated successfully, but these errors were encountered:
Just added identify and group to the v7.x roadmap: #59 We'll probably add these as a typed .identify() and .group() call.
We'll add page and screen call support at some point in the future, it's just lower priority for us right now, since we don't yet support named page calls in the Segment Tracking Plan editor.
Heads up that we just shipped v7 (you can try it out with npx typewriter init), but we cut identify/group support from scope for that release. It's still on our roadmap for a v7.x release, though.
feature proposal ✍️
Please detail the following items when filing a feature request:
Wanted to request that the generated Analytics object would include typed methods for more than just the "track" event.
Ideally, we'd be able to use this as a typesafe wrapper around the whole segment api.
For instance, an example usage from our codebase (simplified):
Ideally instead of "window.analytics" we could always just use a generated client with typesafe args.
In the ideal case, it would probably include a schema for the (in this instance) identify call. But even a loose typescript type like
{[key: string]: any}
would be nice.Also, thanks for this library! It's fantastic, it's not that often that there is an immediate "I wish this existed", "oh my gosh it does" event.
The text was updated successfully, but these errors were encountered: