Skip to content

Commit

Permalink
Types: on* callbacks can be null (#392)
Browse files Browse the repository at this point in the history
  • Loading branch information
th-we authored Feb 10, 2025
1 parent 47eab99 commit 4485ed0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ declare module 'mock-socket' {
readonly readyState: number;
readonly bufferedAmount: number;

onopen: (event: Event) => void;
onerror: (event: Event) => void;
onclose: (event: CloseEvent) => void;
onmessage: (event: MessageEvent) => void;
onopen: ((event: Event) => void) | null;
onerror: ((event: Event) => void) | null;
onclose: ((event: CloseEvent) => void) | null;
onmessage: ((event: MessageEvent) => void) | null;
readonly extensions: string;
readonly protocol: string;
close(code?: number, reason?: string): void;
Expand Down

0 comments on commit 4485ed0

Please sign in to comment.