Skip to content

Commit

Permalink
chore(examples): Update try/catch for Deno change
Browse files Browse the repository at this point in the history
the default type of the caught value changed to unknown in a Typescript
update.
  • Loading branch information
danopia committed Sep 5, 2024
1 parent 2fbdf5a commit 655bd62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/examples/top-nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ for (const node of nodeList.items) {

printStats(summary);

} catch (err) {
} catch (err: unknown) {
console.log(nodeName, ':');
console.log(' -', 'Failed:', err.message);
console.log(' -', 'Failed:', (err as Error).message);
}
}

Expand Down

0 comments on commit 655bd62

Please sign in to comment.