Any ideas how to resolve this issue? It's from the TSCustomNodelWidget demo.
Type 'PortModel<PortModelGenerics> | null' is not assignable to type 'PortModel<PortModelGenerics>'.
Type 'null' is not assignable to type 'PortModel<PortModelGenerics>'. TS2322
For
<PortWidget port={this.props.nodeModel.getPort('in')} ... />
Hey @quangas I got stuck in the same issue. Mind sharing how you resolved this?
Thanks!
I fixed it by changing strict to 'false' in tsconfig.json. I'm using Create-React-App with Typescript.
I think the solution should not to downgrade the level of typescript but adding a null to the PortProps.port interface
Most helpful comment
I think the solution should not to downgrade the level of typescript but adding a
nullto the PortProps.port interface