mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
feat(docgen): proper event parsing for typescript
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { createSocket, Socket } from 'node:dgram';
|
||||
import { EventEmitter } from 'node:events';
|
||||
import { isIPv4 } from 'node:net';
|
||||
import { TypedEmitter } from 'tiny-typed-emitter';
|
||||
import type { Awaited } from '../util/util';
|
||||
|
||||
/**
|
||||
* Stores an IP address and port. Used to store socket details for the local client as well as
|
||||
@@ -17,13 +16,6 @@ interface KeepAlive {
|
||||
timestamp: number;
|
||||
}
|
||||
|
||||
export interface VoiceUDPSocketEvents {
|
||||
error: (error: Error) => Awaited<void>;
|
||||
close: () => Awaited<void>;
|
||||
debug: (message: string) => Awaited<void>;
|
||||
message: (message: Buffer) => Awaited<void>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the response from Discord to aid with local IP discovery.
|
||||
*
|
||||
@@ -61,7 +53,7 @@ const MAX_COUNTER_VALUE = 2 ** 32 - 1;
|
||||
/**
|
||||
* Manages the UDP networking for a voice connection.
|
||||
*/
|
||||
export class VoiceUDPSocket extends TypedEmitter<VoiceUDPSocketEvents> {
|
||||
export class VoiceUDPSocket extends EventEmitter {
|
||||
/**
|
||||
* The underlying network Socket for the VoiceUDPSocket.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user