-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add TypeScript definition #1
Conversation
Thanks for creating a TypeScript definition. 🙌 Can you follow this styleguide? |
* @param separator - The separator to split on. | ||
* @returns The string split on the separator, if possible. | ||
*/ | ||
declare function splitOnFirst(string: string, separator: string): [string, string?]; |
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.
You don't need to declare. You can just export it directly.
* | ||
* @param string - The string to split. | ||
* @param separator - The separator to split on. | ||
* @returns The string split on the separator, if 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.
This is unclear. It makes it seem it returns the string. Should be clearer.
Ping :) |
Closing in favor of #4 |
No description provided.