Esta expressão
max([1]) + 1
dá
Unable to call: `+` with arguments: (`1 | Null`, `1`).
Reasons:
- Expecting Type: `Number`, but got: `Null`.
|-- From: `Number`
|- From: +(lhs: Number, rhs: Number) -> Number
50| max([1]) + 1
^^^^^^^^
- Expecting Type: `Array<T>`, but got: `Null`.
|-- From: `Array<T>`
|- From: +<T, E>(lhs: Array<T>, rhs: E) -> Array<T | E>
50| max([1]) + 1
^^^^^^^^
- 10 more options ...
50| max([1]) + 1
^^^^^^^^^^^^
Mas typeOf(max([1]))
dá Number
. Como obter o resultado de max como um número que pode ser usado em uma operação numérica?