Skip to content

Commit

Permalink
ESLint: require TS return type
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed Nov 8, 2024
1 parent c03711b commit e062161
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ const config = tsEslint.config(
'@typescript-eslint/consistent-type-definitions': 0,
// Sorry, we need many `any` usage.
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/explicit-function-return-type': 2,
'@typescript-eslint/no-unsafe-member-access': 0,
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/no-unsafe-call': 0,
Expand Down
2 changes: 1 addition & 1 deletion node/src/DirectTransport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export class DirectTransport<
/**
* Send RTCP packet.
*/
sendRtcp(rtcpPacket: Buffer) {
sendRtcp(rtcpPacket: Buffer): void {
if (!Buffer.isBuffer(rtcpPacket)) {
throw new TypeError('rtcpPacket must be a Buffer');
}
Expand Down
2 changes: 1 addition & 1 deletion node/src/Producer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ export class Producer<
/**
* Send RTP packet (just valid for Producers created on a DirectTransport).
*/
send(rtpPacket: Buffer) {
send(rtpPacket: Buffer): void {
if (!Buffer.isBuffer(rtpPacket)) {
throw new TypeError('rtpPacket must be a Buffer');
}
Expand Down

0 comments on commit e062161

Please sign in to comment.