chore(Types): include @discordjs/voice typings (#5941)

Co-authored-by: Noel <buechler.noel@outlook.com>
This commit is contained in:
Amish Shah
2021-06-29 18:44:45 +01:00
committed by GitHub
parent 5ad83a6a65
commit 63a8df1c1f
8 changed files with 1216 additions and 1229 deletions

View File

@@ -20,7 +20,8 @@ jobs:
node-version: 14 node-version: 14
- name: Install dependencies - name: Install dependencies
run: npm ci # Remove --no-optional after Node 16 upgrade
run: npm ci --no-optional
- name: Build and deploy documentation - name: Build and deploy documentation
uses: discordjs/action-docs@v1 uses: discordjs/action-docs@v1

View File

@@ -18,7 +18,8 @@ jobs:
registry-url: https://registry.npmjs.org/ registry-url: https://registry.npmjs.org/
- name: Install dependencies - name: Install dependencies
run: npm ci --ignore-scripts # Remove --no-optional after Node 16 upgrade
run: npm ci --ignore-scripts --no-optional
- name: Publish - name: Publish
run: | run: |

View File

@@ -16,7 +16,8 @@ jobs:
node-version: 14 node-version: 14
- name: Install dependencies - name: Install dependencies
run: npm ci # Remove --no-optional after Node 16 upgrade
run: npm ci --no-optional
- name: Run ESLint - name: Run ESLint
run: npm run lint run: npm run lint
@@ -34,7 +35,8 @@ jobs:
node-version: 14 node-version: 14
- name: Install dependencies - name: Install dependencies
run: npm ci # Remove --no-optional after Node 16 upgrade
run: npm ci --no-optional
- name: Run TSLint - name: Run TSLint
run: npm run lint:typings run: npm run lint:typings
@@ -52,7 +54,8 @@ jobs:
node-version: 14 node-version: 14
- name: Install dependencies - name: Install dependencies
run: npm ci # Remove --no-optional after Node 16 upgrade
run: npm ci --no-optional
- name: Register Problem Matcher - name: Register Problem Matcher
run: echo "##[add-matcher].github/tsc.json" run: echo "##[add-matcher].github/tsc.json"
@@ -73,7 +76,8 @@ jobs:
node-version: 14 node-version: 14
- name: Install dependencies - name: Install dependencies
run: npm ci # Remove --no-optional after Node 16 upgrade
run: npm ci --no-optional
- name: Test documentation - name: Test documentation
run: npm run docs:test run: npm run docs:test

View File

@@ -14,7 +14,8 @@ jobs:
node-version: 14 node-version: 14
- name: Install dependencies - name: Install dependencies
run: npm ci # Remove --no-optional after Node 16 upgrade
run: npm ci --no-optional
- name: Run ESLint - name: Run ESLint
run: npm run lint run: npm run lint
@@ -32,7 +33,8 @@ jobs:
node-version: 14 node-version: 14
- name: Install dependencies - name: Install dependencies
run: npm ci # Remove --no-optional after Node 16 upgrade
run: npm ci --no-optional
- name: Run TSLint - name: Run TSLint
run: npm run lint:typings run: npm run lint:typings
@@ -50,7 +52,8 @@ jobs:
node-version: 14 node-version: 14
- name: Install dependencies - name: Install dependencies
run: npm ci # Remove --no-optional after Node 16 upgrade
run: npm ci --no-optional
- name: Register Problem Matcher - name: Register Problem Matcher
run: echo "##[add-matcher].github/tsc.json" run: echo "##[add-matcher].github/tsc.json"
@@ -71,7 +74,8 @@ jobs:
node-version: 14 node-version: 14
- name: Install dependencies - name: Install dependencies
run: npm ci # Remove --no-optional after Node 16 upgrade
run: npm ci --no-optional
- name: Test documentation - name: Test documentation
run: npm run docs:test run: npm run docs:test

2364
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -47,34 +47,33 @@
"dependencies": { "dependencies": {
"@discordjs/collection": "^0.1.6", "@discordjs/collection": "^0.1.6",
"@discordjs/form-data": "^3.0.1", "@discordjs/form-data": "^3.0.1",
"@sapphire/async-queue": "^1.1.2", "@sapphire/async-queue": "^1.1.4",
"@types/ws": "^7.4.4", "@types/ws": "^7.4.5",
"abort-controller": "^3.0.0", "abort-controller": "^3.0.0",
"discord-api-types": "^0.19.0-next.f393ba520d7d6d2aacaca7b3ca5d355fab614f6e", "discord-api-types": "^0.19.0-next.f393ba520d7d6d2aacaca7b3ca5d355fab614f6e",
"node-fetch": "^2.6.1", "node-fetch": "^2.6.1",
"ws": "^7.4.6" "ws": "^7.5.0"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^12.1.4", "@commitlint/cli": "^12.1.4",
"@commitlint/config-angular": "^12.1.4", "@commitlint/config-angular": "^12.1.4",
"@discordjs/docgen": "^0.10.0", "@discordjs/docgen": "^0.10.0",
"@discordjs/voice": "^0.3.0", "@types/node": "^14.17.4",
"@types/node": "^12.12.6",
"conventional-changelog-cli": "^2.1.1", "conventional-changelog-cli": "^2.1.1",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"dtslint": "^4.1.0", "dtslint": "^4.1.0",
"eslint": "^7.27.0", "eslint": "^7.29.0",
"eslint-config-prettier": "^8.3.0", "eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.23.4", "eslint-plugin-import": "^2.23.4",
"eslint-plugin-prettier": "^3.4.0", "eslint-plugin-prettier": "^3.4.0",
"gen-esm-wrapper": "^1.1.1", "gen-esm-wrapper": "^1.1.2",
"husky": "^6.0.0", "husky": "^6.0.0",
"is-ci": "^3.0.0", "is-ci": "^3.0.0",
"jest": "^27.0.3", "jest": "^27.0.6",
"lint-staged": "^11.0.0", "lint-staged": "^11.0.0",
"prettier": "^2.3.0", "prettier": "^2.3.2",
"tslint": "^6.1.3", "tslint": "^6.1.3",
"typescript": "^4.3.2" "typescript": "^4.3.4"
}, },
"engines": { "engines": {
"node": ">=14.0.0", "node": ">=14.0.0",

View File

@@ -8,15 +8,8 @@
"pretty": false, "pretty": false,
"module": "commonjs", "module": "commonjs",
"target": "es2019", "target": "es2019",
"lib": [ "lib": ["esnext", "esnext.array", "esnext.asynciterable", "esnext.intl", "esnext.symbol"],
"esnext",
"esnext.array",
"esnext.asynciterable",
"esnext.intl",
"esnext.symbol"
],
"sourceMap": false, "sourceMap": false,
"skipDefaultLibCheck": true, "skipDefaultLibCheck": true
"skipLibCheck": true
} }
} }

21
typings/index.d.ts vendored
View File

@@ -152,6 +152,25 @@ declare enum WebhookTypes {
type Awaited<T> = T | Promise<T>; type Awaited<T> = T | Promise<T>;
declare module '@discordjs/voice' {
import { GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData } from 'discord-api-types/v8';
export interface DiscordGatewayAdapterLibraryMethods {
onVoiceServerUpdate(data: GatewayVoiceServerUpdateDispatchData): void;
onVoiceStateUpdate(data: GatewayVoiceStateUpdateDispatchData): void;
destroy(): void;
}
export interface DiscordGatewayAdapterImplementerMethods {
sendPayload(payload: any): boolean;
destroy(): void;
}
export type DiscordGatewayAdapterCreator = (
methods: DiscordGatewayAdapterLibraryMethods,
) => DiscordGatewayAdapterImplementerMethods;
}
declare module 'discord.js' { declare module 'discord.js' {
import BaseCollection from '@discordjs/collection'; import BaseCollection from '@discordjs/collection';
import { ChildProcess } from 'child_process'; import { ChildProcess } from 'child_process';
@@ -380,7 +399,7 @@ declare module 'discord.js' {
public valueOf(): N; public valueOf(): N;
public [Symbol.iterator](): IterableIterator<S>; public [Symbol.iterator](): IterableIterator<S>;
public static FLAGS: unknown; public static FLAGS: unknown;
public static resolve(bit?: BitFieldResolvable<S, N>): number | bigint; public static resolve(bit?: BitFieldResolvable<any, number | bigint>): number | bigint;
} }
export class ButtonInteraction extends MessageComponentInteraction { export class ButtonInteraction extends MessageComponentInteraction {