JetBrains / kotlin-wrappers

Kotlin wrappers for popular JavaScript libraries
Apache License 2.0
1.33k stars 165 forks source link

node.http.ServerResponse.writeHead overload ambiguity #2254

Open vlsi opened 1 month ago

vlsi commented 1 month ago

Is your feature request related to a problem? Please describe.

res.writeHead(200, "Ok", undefined.unsafeCast<OutgoingHttpHeaders>())

Currently, there's no way to omit headers parameter as Kotlin compiler is confused between OutgoingHttpHeaders and ReadOnlyArray<OutgoingHttpHeader> overloads.

missing writeHead(int, string) overload

Describe the solution you'd like

res.writeHead(200, "Ok")

Additional context