feat(website): Show constructor information (#8540)

This commit is contained in:
Suneet Tipirneni
2022-08-22 03:45:53 -04:00
committed by GitHub
parent dd44e8b6ec
commit e42fd16369
66 changed files with 689 additions and 625 deletions

View File

@@ -165,22 +165,22 @@ export type VoiceConnectionState =
export interface VoiceConnection extends EventEmitter {
/**
* Emitted when there is an error emitted from the voice connection
* @event
* @eventProperty
*/
on(event: 'error', listener: (error: Error) => void): this;
/**
* Emitted debugging information about the voice connection
* @event
* @eventProperty
*/
on(event: 'debug', listener: (message: string) => void): this;
/**
* Emitted when the state of the voice connection changes
* @event
* @eventProperty
*/
on(event: 'stateChange', listener: (oldState: VoiceConnectionState, newState: VoiceConnectionState) => void): this;
/**
* Emitted when the state of the voice connection changes to a specific status
* @event
* @eventProperty
*/
on<T extends VoiceConnectionStatus>(
event: T,

View File

@@ -154,27 +154,27 @@ export type AudioPlayerState =
export interface AudioPlayer extends EventEmitter {
/**
* Emitted when there is an error emitted from the audio resource played by the audio player
* @event
* @eventProperty
*/
on(event: 'error', listener: (error: AudioPlayerError) => void): this;
/**
* Emitted debugging information about the audio player
* @event
* @eventProperty
*/
on(event: 'debug', listener: (message: string) => void): this;
/**
* Emitted when the state of the audio player changes
* @event
* @eventProperty
*/
on(event: 'stateChange', listener: (oldState: AudioPlayerState, newState: AudioPlayerState) => void): this;
/**
* Emitted when the audio player is subscribed to a voice connection
* @event
* @eventProperty
*/
on(event: 'subscribe' | 'unsubscribe', listener: (subscription: PlayerSubscription) => void): this;
/**
* Emitted when the status of state changes to a specific status
* @event
* @eventProperty
*/
on<T extends AudioPlayerStatus>(
event: T,

View File

@@ -7,7 +7,7 @@ import { noop } from '../util/util';
/**
* Options that are set when creating a new audio resource.
*
* @template T - the type for the metadata (if any) of the audio resource
* @typeParam T - the type for the metadata (if any) of the audio resource
*/
export interface CreateAudioResourceOptions<T> {
/**
@@ -38,7 +38,7 @@ export interface CreateAudioResourceOptions<T> {
/**
* Represents an audio resource that can be played by an audio player.
*
* @template T - the type for the metadata (if any) of the audio resource
* @typeParam T - the type for the metadata (if any) of the audio resource
*/
export class AudioResource<T = unknown> {
/**
@@ -204,7 +204,7 @@ export function inferStreamType(stream: Readable): {
* @param input - The resource to play
* @param options - Configurable options for creating the resource
*
* @template T - the type for the metadata (if any) of the audio resource
* @typeParam T - the type for the metadata (if any) of the audio resource
*/
export function createAudioResource<T>(
input: string | Readable,
@@ -228,7 +228,7 @@ export function createAudioResource<T>(
* @param input - The resource to play
* @param options - Configurable options for creating the resource
*
* @template T - the type for the metadata (if any) of the audio resource
* @typeParam T - the type for the metadata (if any) of the audio resource
*/
export function createAudioResource<T extends null | undefined>(
input: string | Readable,
@@ -248,7 +248,7 @@ export function createAudioResource<T extends null | undefined>(
* @param input - The resource to play
* @param options - Configurable options for creating the resource
*
* @template T - the type for the metadata (if any) of the audio resource
* @typeParam T - the type for the metadata (if any) of the audio resource
*/
export function createAudioResource<T>(
input: string | Readable,

View File

@@ -155,7 +155,7 @@ export interface Networking extends EventEmitter {
/**
* Debug event for Networking.
*
* @event
* @eventProperty
*/
on(event: 'debug', listener: (message: string) => void): this;
on(event: 'error', listener: (error: Error) => void): this;

View File

@@ -10,13 +10,13 @@ export interface VoiceWebSocket extends EventEmitter {
/**
* Debug event for VoiceWebSocket.
*
* @event
* @eventProperty
*/
on(event: 'debug', listener: (message: string) => void): this;
/**
* Packet event.
*
* @event
* @eventProperty
*/
on(event: 'packet', listener: (packet: any) => void): this;
}

View File

@@ -4,13 +4,13 @@ import { EventEmitter } from 'node:events';
export interface SpeakingMap extends EventEmitter {
/**
* Emitted when a user starts speaking.
* @event
* @eventProperty
*/
on(event: 'start', listener: (userId: string) => void): this;
/**
* Emitted when a user ends speaking.
* @event
* @eventProperty
*/
on(event: 'end', listener: (userId: string) => void): this;
}