JetBrains/kotlin-wrappers

`IncomingMessage.statusCode` breaking type change

Closed this issue · 1 comments

I'm upgrading from 529 to 806.

node.http.IncomingMessage.statusCode used to be Number?.
Now it is Double?, which seems to be wrong to me.

I had if (response.message.statusCode != 200) which does not compile anymore.

I guess it should either be Number? or even Int?.

Or maybe even HttpCodes?
Which should probably be renamed to HttpCode.

Right now I try to do
if (response.message.statusCode != HttpCodes.OK.unsafeCast<Double>()) { as a replacement.
Would be nice if it in the end were just
if (response.message.statusCode != HttpCodes.OK) {.