ts-generator
ts-generator copied to clipboard
Added formatType to public api
Nice project :+1: . 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(...)
}
"""