BlinkID / blinkid-in-browser

BlinkID In-browser SDK for WebAssembly-enabled browsers.
https://microblink.com/blinkid
59 stars 30 forks source link

Probably wrong type definition mismatch #68

Open kemenydani opened 2 years ago

kemenydani commented 2 years ago

I try to set custom translations to the web component on typescript and it looks like the type definition of the translations property is not matching with the defaultTranslations in the translations service.

Type definition of web component: https://github.com/BlinkID/blinkid-in-browser/blob/ecf9868430fa270156a4c96574a7f6d9d20b9fe5/ui/src/components.d.ts#L155 [key: string]: string

Type definition of defaultTranslations: https://github.com/BlinkID/blinkid-in-browser/blob/ecf9868430fa270156a4c96574a7f6d9d20b9fe5/ui/src/utils/translation.service.ts#L5 [key: string]: string|Array<string>

Screenshot 2022-02-14 at 09 32 59

After using // @ts-ignore on that line it knows how to process the list of strings, so probably this is type definitions mismatch between the web component and translation service.