Skip to content

Commit

Permalink
Better typing for Timers.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Feb 4, 2020
1 parent edb7c5d commit 5622f70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/web/src.ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export function fetchJson(connection: string | ConnectionInfo, json?: string, pr
options.headers = flatHeaders;

const runningTimeout = (function() {
let timer: any = null;
let timer: NodeJS.Timer = null;
const promise = new Promise(function(resolve, reject) {
if (timeout) {
timer = setTimeout(() => {
Expand Down Expand Up @@ -232,7 +232,7 @@ export function poll(func: () => Promise<any>, options?: PollOptions): Promise<a

return new Promise(function(resolve, reject) {

let timer: any = null;
let timer: NodeJS.Timer = null;
let done: boolean = false;

// Returns true if cancel was successful. Unsuccessful cancel means we're already done.
Expand Down

0 comments on commit 5622f70

Please sign in to comment.