Skip to content

Commit

Permalink
refactor(MessageEnvelope): improve setPriority/getPriority typings
Browse files Browse the repository at this point in the history
  • Loading branch information
weyoss committed Dec 11, 2023
1 parent 5826cdb commit 91c44f0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/lib/message/message-envelope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,7 @@ export class MessageEnvelope {
return this;
}

setPriority(priority: number): MessageEnvelope {
if (
priority < EMessagePriority.HIGHEST ||
priority > EMessagePriority.LOWEST
) {
throw new MessageError('Invalid message priority.');
}
setPriority(priority: EMessagePriority): MessageEnvelope {
this.priority = priority;
return this;
}
Expand Down Expand Up @@ -313,7 +307,7 @@ export class MessageEnvelope {
return this.destinationQueue;
}

getPriority(): number | null {
getPriority(): EMessagePriority | null {
return this.priority;
}

Expand Down

0 comments on commit 91c44f0

Please sign in to comment.