Class TypeScriptWriter

java.lang.Object
com.vaadin.hilla.generator.typescript.TypeScriptWriter

public final class TypeScriptWriter extends Object
Writes every file of one run of the generator: the client the endpoints call the server with, a file per endpoint, the barrel naming them, and for each of the types they refer to a declaration and the model a form binds it through, along with a union for each polymorphic one.

The files are what the run produces rather than what is on disk: writing them out, and removing what a previous run left behind, is the work of whoever asks for them.

  • Constructor Details

    • TypeScriptWriter

      public TypeScriptWriter()
      Writes the files against the generated client.
    • TypeScriptWriter

      public TypeScriptWriter(String clientModule)
      Parameters:
      clientModule - the module exporting the client the endpoints call the server with, which is the generated one unless the application has one of its own, and then no client is generated
  • Method Details