-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add TypeScript typings #66
Conversation
Awesome, thanks. I'll review it the next days. |
This would be useful for me. Looks like all status checks pass. Did you get time to look at this @jhnns? Happy to help in any way possible 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an error in the typing :)
src/index.d.ts
Outdated
} | ||
} | ||
|
||
declare function parseDomain (url: string, customTlds?: RegExp | string[], privateTlds?: boolean): parseDomain.IParsedDomain; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
customTlds
and privateTlds
should be part of an ParseOptions
object. Take a look at the README :)
@jhnns I have fixed your review point. please review me again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks ❤️. There's still one mistake (I missed it in the first review as well, sorry), but I'm going to merge this one and fix it on master.
} | ||
} | ||
|
||
declare function parseDomain (url: string, options?: parseDomain.IParseOptions): parseDomain.IParsedDomain; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parseDomain()
returns null
when the given URL was not valid.
Refer to #31.
I made a Typings file. but I just followed #31 way, though.
I would happy if I can make the first contribution.
Thanks.