typescriptpoet icon indicating copy to clipboard operation
typescriptpoet copied to clipboard

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

Open Legion2 opened this issue 2 years ago • 5 comments
trafficstars

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: https://github.com/outfoxx/typescriptpoet/blob/62d7d4b276b6039bd04729ddb135a9428e61b03e/src/main/java/io/outfoxx/typescriptpoet/FunctionSpec.kt#L107-L109

Legion2 avatar Jul 24 '23 15:07 Legion2

Agreed.

kdubb avatar Jul 25 '23 02:07 kdubb

I created #25

Legion2 avatar Jul 25 '23 11:07 Legion2