Skip to content

Set explicit void return type in function builder if set by the user #24

@Legion2

Description

@Legion2

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))
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions