When the return type is explicitly set to void it should also be set in the generated code explicitly to void. When enabling strict type checking in typescript compiler with the noImplicitAny option, all functions without explicit return type default to any.
Following code must be changed:
|
if (returnType != null && returnType != TypeName.VOID) { |
|
codeWriter.emitCode(CodeBlock.of(": %T", returnType)) |
|
} |