I am currently in the process of converting some code that attempts to create an instance of http.ServerResponse
. However, typescript is throwing an error:
[ts] Property 'ServerResponse' does not exist on type 'typeof "http"'.
I have verified through the console that http.ServerResponse
is indeed a class that can be created during runtime.
According to the typings in @types/node
, http.ServerResponse
is defined as:
export interface ServerResponse extends stream.Writable`
where stream.Writable
points to a class internal.Writable
So, is there a way to resolve this issue (related to an interface extending a class) or is it simply a problem with the definitely-typed definitions?