Skip to content

Conversation

@hannukp
Copy link

@hannukp hannukp commented Mar 10, 2022

Nice project 👍 . I'm using it to generate Promise-based http client API in addition to DTOs, and for that reason I needed to add formatType to the public API.

Then it's possible to do something like this to generate function signature:

val gen = TypeScriptGenerator(...)

val typescript = """function callMyApi(${param.name}: ${gen.formatType(param.type)}): Promise<${gen.formatType(returnType)}> {
    return http.get(...)
}
"""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant