UNPKG

@segment/analytics-next

Version:

Analytics Next (aka Analytics 2.0) is the latest version of Segment’s JavaScript SDK - enabling you to send your data to any tool without having to learn, test, or use a new API every time.

22 lines (19 loc) 577 B
import { CoreContext, ContextCancelation, ContextFailedDelivery, SerializedContext, CancelationOptions, } from '@segment/analytics-core' import { SegmentEvent } from '../events/interfaces' import { Stats } from '../stats' export class Context extends CoreContext<SegmentEvent> { static override system() { return new this({ type: 'track', event: 'system' }) } constructor(event: SegmentEvent, id?: string) { super(event, id, new Stats()) } } export { ContextCancelation } export type { ContextFailedDelivery, SerializedContext, CancelationOptions }