overwolf.io.listenToFile wrong typescript definition

Getting a typescript error on using listenToFile with skipToEnd but not defening an encoding.

This is because encoding is not set as optional inside ListenFileOptions (types/overwolf.d.ts at master · overwolf/types · GitHub).

The ListenFileOptions.encoding also does not seem to be in line with the overwolf docs.
The docs say that ListenFileOptions’s encoding is ‘Default’ by default. However, that does not seem to be a property of overwolf.io.enums.eEncoding (while it is on overwolf.io.enums.encoding).

Hey @heartharena,

Thanks for letting us know.
I fixed it by making the encoding param optional in the ListenFileOptions typedef.
Regarding your comment ListenFileOptions.encoding also does not seem to be in line with the overwolf docs - actually from my check, I can see that writeFile and readFile are using eEncoding enum, and listenOnFile uses encoding enum which is a different enum (that contains the Default value).

Thanks,
Eran