mistval / unofficial-jisho-api

Encapsulates the official Jisho.org API and also provides kanji, example, and stroke diagram search.
MIT License
139 stars 14 forks source link

Add missing types #32

Closed h7x4 closed 3 years ago

h7x4 commented 3 years ago

These were some missing types of the native API.

The restriction list is used for describing which "versions of the word" (some words have multiple kanji) can be used to express the selected sense of the word

The source list contains information about which language(s) the word originated from.

I found them by searching through *a, *i, *u, *e, *o, *n, and filtering out the ones where the lists were populated. Turns out both are quite rare.

mistval commented 3 years ago

Hello, I see you added a JishoWordSource interface, but used string[] for the type of the source property. Should it be JishoWordSource[] instead? And if not, do we still need the JishoWordSource interface for some reason?

h7x4 commented 3 years ago

Yes, I just noticed I made a slight mistake. source is supposed to be JishoWordSource[]

mistval commented 3 years ago

Looks good 👍 Thank you. I will publish it to NPM in just a couple of minutes. It will be v2.2.1.