Skip to content

Commit

Permalink
Add explicit void return type if set by user
Browse files Browse the repository at this point in the history
  • Loading branch information
Legion2 authored Jul 25, 2023
1 parent 62d7d4b commit db4012c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/io/outfoxx/typescriptpoet/FunctionSpec.kt
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private constructor(
codeWriter.emitCode("]")
}

if (returnType != null && returnType != TypeName.VOID) {
if (returnType != null) {
codeWriter.emitCode(CodeBlock.of(": %T", returnType))
}
}
Expand Down

0 comments on commit db4012c

Please sign in to comment.