typescriptpoet
typescriptpoet copied to clipboard
Fix CodeBlock of handle CodeBlock args wrong
If CodeBlock is added to other CodeBlock via %L
template parameter, toString()
is used on the first CodeBlock and then added to second CodeBlock, this makes it impossible for the second code block to know the used symbols and imports required by the first CodeBlock und they are not imported in the file when rendered with FileSpec. In the CodeWriter the %L
is handled correctly, however the CodeBlock arguments are converted to strings in CodeBlock already.
https://github.com/outfoxx/typescriptpoet/blob/62d7d4b276b6039bd04729ddb135a9428e61b03e/src/main/java/io/outfoxx/typescriptpoet/CodeBlock.kt#L339