Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added formatType to public api #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

None yet

1 participant