make generated typescript bindings adhere to strict mode
Zercerium opened this issue · 3 comments
At the moment the generated .ts files does not pass the strict typescript mode.
A possible (interims) solution could be to add // @ts-nocheck
to the generated files.
So you don't have to do it every time again, if the file is regenerated.
It would be counterintuitive to disable strict mode project wide. Many projects which want type safe ipc calls also want strict type checking (imho).
thanks for the great work.
Yeah this makes perfect sense to me, do you know what errors ts throws when given a code generated file?
most of them are: Parameter 'xyz' implicitly has an 'any' type.
in serializeResult
the function serializeU8
is called, which is not declared. (this is probably only related to my generated file)
if you drop a tsconfig.json file in the folder above the test folder with the TS test files you should get all errors presented. (at least in VS Code)
{
"compilerOptions": {
"strict": true,
}
}
Aye yeah, okay that makes sense. The deserialization and serialization code doesn't have any types so that's why. I don't expect these functions to remain code generated this way (will be moved into the ipc router hopefully) so let's just go with the ts-ignore option