Closed ciiiii closed 2 years ago
The tld
options is missing in type definitions, please add it.
src/translate.ts:6:66 - error TS2345: Argument of type '{ from: string; to: string; tld: string; }' is not assignable to parameter of type 'IOptions'.
Object literal may only specify known properties, and 'tld' does not exist in type 'IOptions'.
6 const res = await translate(english, {from: 'en', to: 'zh-CN', tld: 'cn'})
~~~~~~~~~
Found 1 error.
I've released 8.0.0 with fixed types.
Now everything should be correct - tld
is just string.
Feel free to reopen if needed.
Type definition should sync with the code implementation.