close #20 add types
This commit is contained in:
@@ -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
23
typings/index.d.ts
vendored
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user