Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rrweb/types

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rrweb/types

This package contains the shared types used across rrweb packages. See the [guide](../../guide.md) for more info on rrweb.

  • 2.0.0-alpha.18
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is @rrweb/types?

@rrweb/types is a TypeScript type definition package for rrweb, a library for recording and replaying user interactions on web pages. This package provides type definitions for various events and data structures used in rrweb, making it easier to work with rrweb in TypeScript projects.

What are @rrweb/types's main functionalities?

Event Types

Defines the structure of an event with time, which includes the type of event, data associated with the event, timestamp, and delay.

import { eventWithTime } from '@rrweb/types';

const event: eventWithTime = {
  type: 1,
  data: {},
  timestamp: Date.now(),
  delay: 0
};

Incremental Snapshot Event

Defines the structure of an incremental snapshot event, which includes the type of event, data related to the snapshot, timestamp, and delay.

import { incrementalSnapshotEvent } from '@rrweb/types';

const snapshotEvent: incrementalSnapshotEvent = {
  type: 2,
  data: {
    source: 1,
    positions: [{ x: 0, y: 0, id: 1 }]
  },
  timestamp: Date.now(),
  delay: 0
};

Full Snapshot Event

Defines the structure of a full snapshot event, which includes the type of event, data related to the full snapshot, timestamp, and delay.

import { fullSnapshotEvent } from '@rrweb/types';

const fullSnapshot: fullSnapshotEvent = {
  type: 3,
  data: {
    node: {
      id: 1,
      type: 1,
      childNodes: []
    }
  },
  timestamp: Date.now(),
  delay: 0
};

Other packages similar to @rrweb/types

Keywords

FAQs

Package last updated on 06 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc