Closed vgpro54321 closed 2 years ago
Anybody alive?
By the design.
under exceptions, It throws InvalidOperationException if 'source contains no elements'
Only outlier to that are nullable numeric types - which would be number | null
or similar in TS, I suppose. The library only supports max(this: IEnumerable<number>): number
and TSC should error out if you pass anything else in sctrict mode.
Make sense, thank you!
Hello Guys,
IEnumerable<>.max() function in .NET returns null when sequence is empty (semantics maximum is unknown). LinqToTypeScript throws an error. Is this by design?