The return type for Model.getNodeById is showing as Node when it could possibly be undefined due to no node with the given id existing. It should be explicitly marked as Node | undefined.
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Call const node = model.getNodeById("something that does not exist"). node will show as being of type Node when it's possible that it's undefined.
Describe the bug
The return type for Model.getNodeById is showing as
Node
when it could possibly beundefined
due to no node with the givenid
existing. It should be explicitly marked asNode | undefined
.Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Call
const node = model.getNodeById("something that does not exist")
.node
will show as being of typeNode
when it's possible that it'sundefined
.Expected behavior
Types to be correct.
Operating System
Windows
Browser Type?
Chrome
Browser Version
110
Screenshots or Videos
None
Additional context
No response