From 655bd62b0eae6bab4dade34cdec9179a64e45fce Mon Sep 17 00:00:00 2001 From: Daniel Lamando Date: Fri, 6 Sep 2024 00:24:55 +0200 Subject: [PATCH] chore(examples): Update try/catch for Deno change the default type of the caught value changed to unknown in a Typescript update. --- lib/examples/top-nodes.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/examples/top-nodes.ts b/lib/examples/top-nodes.ts index 420f34a..4916538 100755 --- a/lib/examples/top-nodes.ts +++ b/lib/examples/top-nodes.ts @@ -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); } }