We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example:
var {Record, List} = require("typed-immutable"); var Point = Record({x: Number(0), y: Number(0)}) var Points = List(Point, "Points") ps = Points.of({x:3}, {y: 5}) ps.map(a => a.x || null);
this throws a "TypeError: Cannot read property 'constructor' of null"
I believe what is happening here is that the type inferer is not correctly returning a new List(Maybe(Number)).
List(Maybe(Number))
The text was updated successfully, but these errors were encountered:
You might need to use List.reduce and a new List(Maybe(Number)) to do this, the behavior is as documented.
I wouldn't be against a way of telling List.map which type of list you want to end up with, that would let you use both Any or Maybe.
Sorry, something went wrong.
No branches or pull requests
Example:
this throws a "TypeError: Cannot read property 'constructor' of null"
I believe what is happening here is that the type inferer is not correctly returning a new
List(Maybe(Number))
.The text was updated successfully, but these errors were encountered: