From 2bcb843faf4c8a8804d97729a97fea893b0dfe86 Mon Sep 17 00:00:00 2001 From: Bernardo Belchior Date: Mon, 15 Apr 2019 18:18:31 +0100 Subject: [PATCH] Update getNode return type Update getNode return type, since the 'id' may not map to a valid node. In this case, node-red will return null. --- types/node-red/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/node-red/index.d.ts b/types/node-red/index.d.ts index bc58257e2c..0954ad56af 100644 --- a/types/node-red/index.d.ts +++ b/types/node-red/index.d.ts @@ -173,9 +173,9 @@ export interface Nodes { * node, this call is used to get access to the running * instance. * @param id - the id of the node. - * @return - the node matching the given id. + * @return - the node matching the given id, or null if it does not exist. */ - getNode(id: NodeId): Node; + getNode(id: NodeId): Node | null; /** * Cycle through all node definition objects. *