I defined the null Node by this statement (context: Angular):
let selectedNode: go.Node = null;
The message I see by the VS Code: Type ‘null’ is not assignable to type ‘Node’.
What is the right way to define the null Node
I defined the null Node by this statement (context: Angular):
let selectedNode: go.Node = null;
The message I see by the VS Code: Type ‘null’ is not assignable to type ‘Node’.
What is the right way to define the null Node
Your TypeScript compiler settings must be including --strictNullChecks
.
Please read https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-0.html.