Skip to content

Commit 85efc59

Browse files
committed
fix(replay): fix rrwebRecord return type to include undefined
The upstream rrweb record() returns undefined when initialization fails, but the local type declared it as () => void. This meant TypeScript wouldn't warn about the missing undefined check.
1 parent 0b5cac8 commit 85efc59

File tree

1 file changed

+1
-1
lines changed
  • packages/browser/src/extensions/replay/types

1 file changed

+1
-1
lines changed

packages/browser/src/extensions/replay/types/rrweb.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export type recordOptions = {
104104

105105
// Replication of `record` from inside `@rrweb/record`
106106
export type rrwebRecord = {
107-
(options: recordOptions): () => void
107+
(options: recordOptions): (() => void) | undefined
108108
addCustomEvent: (tag: string, payload: any) => void
109109
takeFullSnapshot: () => void
110110
mirror: {

0 commit comments

Comments
 (0)