Skip to content

Commit

Permalink
feat(typings): add typings (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
iCrawl authored Apr 25, 2020
1 parent 5e535d8 commit 8db6966
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.1.0",
"description": "Opus bindings for Node",
"main": "lib/index.js",
"types": "typings/index.d.ts",
"author": "iCrawl <[email protected]>",
"license": "MIT",
"scripts": {
Expand Down
12 changes: 12 additions & 0 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
declare module '@discordjs/opus' {
export class OpusEncoder {
public constructor(rate: number, channels: number);

public encode(buf: Buffer): Buffer;
public decode(buf: Buffer): Buffer;
public applyEncoderCTL(ctl: number, value: number): void;
public applyDecoderCTL(ctl: number, value: number): void;
public setBirate(bitrate: number): void;
public getBitrate(): number;
}
}

0 comments on commit 8db6966

Please sign in to comment.