File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
main/java/io/outfoxx/typescriptpoet
test/java/io/outfoxx/typescriptpoet/test Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ private constructor(
104104 codeWriter.emitCode(" ]" )
105105 }
106106
107- if (returnType != null && returnType != TypeName . VOID ) {
107+ if (returnType != null ) {
108108 codeWriter.emitCode(CodeBlock .of(" : %T" , returnType))
109109 }
110110 }
Original file line number Diff line number Diff line change @@ -197,8 +197,8 @@ class FunctionSpecTests {
197197 }
198198
199199 @Test
200- @DisplayName(" Generates no return type when void" )
201- fun testGenNoReturnTypeForVoid () {
200+ @DisplayName(" Generates return type when void" )
201+ fun testGenReturnTypeForVoid () {
202202 val testClass = FunctionSpec .builder(" test" )
203203 .returns(TypeName .VOID )
204204 .build()
@@ -210,7 +210,7 @@ class FunctionSpecTests {
210210 out .toString(),
211211 equalTo(
212212 """
213- function test() {
213+ function test(): void {
214214 }
215215
216216 """ .trimIndent()
You can’t perform that action at this time.
0 commit comments