close #20 add types

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent 7a700b8947
commit 3af515327b
2 changed files with 24 additions and 0 deletions

View File

@@ -41,6 +41,7 @@
"lib",
"dist"
],
"typings": "typings/index.d.ts",
"repository": {
"type": "git",
"url": "git+https://github.com/rrweb-io/rrweb-player.git"

23
typings/index.d.ts vendored Normal file
View File

@@ -0,0 +1,23 @@
import { eventWithTime } from 'rrweb/typings/types';
export default class rrwebPlayer {
constructor(options: {
target: HTMLElement;
props: {
events: eventWithTime[];
width?: number;
height?: number;
skipInactive?: boolean;
autoPlay?: number;
speedOption?: number[];
showController?: boolean;
showWarning?: boolean;
showDebug?: boolean;
tags?: Record<string, string>;
};
});
addEventListener(event: string, handler: () => unknown): void;
addEvent(event: eventWithTime): void;
}