Skip to content

Commit

Permalink
feat: upgrade TypeScript to version 5 (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
rockymadden authored Apr 29, 2024
1 parent 64ddea0 commit f3199c3
Show file tree
Hide file tree
Showing 4 changed files with 1,388 additions and 876 deletions.
4 changes: 2 additions & 2 deletions lib/democracy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Democracy extends EventEmitter {

private _nodes: NodeInfoMap;

private _helloTimer: NodeJS.Timer | null;
private _helloTimer: ReturnType<typeof setInterval> | null;

private _id: NodeId;

Expand Down Expand Up @@ -114,7 +114,7 @@ class Democracy extends EventEmitter {
*/
start(): this {
const setup = () => {
// Setup the UDP socket to listen on.
// Setup the UDP socket to listen on.
this.socket = createSocket({type: 'udp4', reuseAddr: true});

// Bind to the UDP port and begin listeneing for hello, etc messages.
Expand Down
2 changes: 1 addition & 1 deletion lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type NodeInfo = {
last: number, // ms timestamp
voters: Array<NodeId>,
source: NodeAddress,
disconnected?: NodeJS.Timer,
disconnected?: ReturnType<typeof setTimeout>,
};

// Used for this._nodes
Expand Down
Loading

0 comments on commit f3199c3

Please sign in to comment.