Skip to content
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 types #93

Open
wants to merge 18 commits into
base: dev
Choose a base branch
from
Open

Add types #93

wants to merge 18 commits into from

Conversation

ALOHACREPES345
Copy link

Thank you for creating nice library.
I'm trying to use this library for my TypeScript project, but it needs declaration (.d.ts) file.

I saw below issue, but nobody has dealt with it, so I added.
#48

Also, please refer to this pull request. hexenq/kuroshiro-analyzer-kuromoji#7
If "kuroshiro" user uses "kuroshiro-analyzer-kuromoji", needs types as well.

Thank you.

hexenq and others added 18 commits August 2, 2018 17:10
build: update package.json
docs: fix spelling mistake
docs: fix internal links in docs
[1.1.1] Handle invalid parameter when initializing kuroshiro
docs: update CONTRIBUTING.md
* upgrade to babel 7

* attempt to fix errors occurring when converting っ to romaji (hexenq#61)

* fix: wrong regex pattern fixed

* build: bump deps

* build(npm): add husky and lint-staged for pre-commit check

* Esperanto docs (hexenq#71)

* Update docs

* add ready to use code in readme (hexenq#77)

* build: bump deps

Co-authored-by: Omar Diab <me@omardiab.com>
Co-authored-by: erdOne <36414270+erdOne@users.noreply.github.com>
Co-authored-by: bbible3 <46682358+bbible3@users.noreply.github.com>
Co-authored-by: Richard Osmar Leon Ingaruca <import.linet@gmail.com>
@yusuftaufiq
Copy link

This is great PR, but it seems the repository owner has been inactive for a while. Can this PR be opened to DefinitelyTyped instead?

@RupW RupW mentioned this pull request Jul 11, 2023
Copy link

@dathmart dathmart left a comment

Choose a reason for hiding this comment

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

Looks great! Only thing I can suggest is to limit these types which appear to have discrete values in the implementation 🚀

convert(
str: string,
options?: {
to?: string;

Choose a reason for hiding this comment

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

Suggested change
to?: string;
to?: 'hiragana' | 'katakana' | 'romaji';

Comment on lines +10 to +11
mode?: string;
romajiSystem?: string;

Choose a reason for hiding this comment

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

Suggested change
mode?: string;
romajiSystem?: string;
mode?: 'normal' | 'spaced' | 'okurigana' | 'furigana';
romajiSystem?: 'nippon' | 'passport' | 'hepburn';

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.

None yet

4 participants