DefinitelyTyped icon indicating copy to clipboard operation
DefinitelyTyped copied to clipboard

ExpressServerRequest needs a url: string; property

Open qorrect opened this issue 13 years ago • 3 comments

Also I see this

interface Handler { (req: ExpressServerRequest, res: ExpressServerResponse, next?: Function): void; }

How do I use that ?

qorrect avatar Mar 16 '13 20:03 qorrect

The express definition to ExpressServerRequest interface was made based on express request.js file. I just saw that this request object extends http.IncomingMessage object and the url propery is defined on http.IncomingMessage.

To solve your issue I'll make ExpressServerRequest extend http.ServerRequest interface defined on node.d.ts.

can you send some code snippet using the url property to be used as a test?

Diullei avatar Mar 16 '13 21:03 Diullei

Sure, let me see how DTyped does tests :).

On Sat, Mar 16, 2013 at 4:28 PM, Diullei Gomes [email protected]:

The express definition to ExpressServerRequest interface was made based on express request.jshttps://github.com/visionmedia/express/blob/master/lib/request.jsfile. I just saw that this request object extends http.IncomingMessagehttps://github.com/visionmedia/express/blob/master/lib/request.js#L19object and the url propery is defined on http.IncomingMessagehttps://github.com/joyent/node/blob/master/lib/http.js#L307 .

To solve your issue I'll make ExpressServerRequest extend http.ServerRequesthttps://github.com/borisyankov/DefinitelyTyped/blob/master/node/node.d.ts#L243interface defined on node.d.ts.

can you send some code snippet using the url property to be used as a test?

— Reply to this email directly or view it on GitHubhttps://github.com/borisyankov/DefinitelyTyped/issues/403#issuecomment-15012577 .

Thanks! Charlie 512-698-2009

qorrect avatar Mar 16 '13 21:03 qorrect

This issue appears to like have solved. Can I close this?

horiuchi avatar Jan 20 '15 02:01 horiuchi