Skip to content

Create typescript type definitions#2

Open
natekfl wants to merge 2 commits into
jue89:masterfrom
natekfl:master
Open

Create typescript type definitions#2
natekfl wants to merge 2 commits into
jue89:masterfrom
natekfl:master

Conversation

@natekfl
Copy link
Copy Markdown

@natekfl natekfl commented Oct 19, 2020

No description provided.

Copy link
Copy Markdown
Owner

@jue89 jue89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR!

I'll have a deeper look soon. But I already found something to comment on ;)

Comment thread index.d.ts Outdated
mode: "netascii" | "octet" | "mail"
}
export type Response = (buf: Buffer) => void
export type Handler = (req: Request, res: Response, next: () => void) => void
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The next callback has an optional parameter that takes an instance of Error to abort the handle lookup.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added :)

Add err to next(), and change default parameter in createServer to optional as d.ts files don't support default parameters without implementations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants