Class TypeScriptProcessor

java.lang.Object
com.vaadin.hilla.engine.TypeScriptProcessor

public final class TypeScriptProcessor extends Object
Writes the TypeScript of the endpoints, which is what the browser calls the server through, into the folder the application reads it from.
  • Constructor Details

    • TypeScriptProcessor

      public TypeScriptProcessor(EngineAutoConfiguration conf)
    • TypeScriptProcessor

      public TypeScriptProcessor(Path baseDir, Path outputDirectory)
      Parameters:
      baseDir - the folder of the application, which a relative output folder is resolved against
      outputDirectory - the folder the generated files go into
  • Method Details

    • generate

      public static com.vaadin.hilla.generator.model.Generation generate(EngineAutoConfiguration conf) throws BrowserCallableFinderException
      Finds the browser callable classes the configuration says how to find, walks them and writes their TypeScript, which is what a build does.
      Returns:
      what the walk found
      Throws:
      BrowserCallableFinderException
    • generate

      public static com.vaadin.hilla.generator.model.Generation generate(EngineAutoConfiguration conf, List<Class<?>> browserCallables)
      Walks the given browser callable classes and writes their TypeScript.
      Returns:
      what the walk found, which tells what the TypeScript is written from
    • process

      public void process(com.vaadin.hilla.generator.model.Generation generation) throws GeneratorException
      Writes the files of one generation, and removes what the run before it left behind.
      Parameters:
      generation - everything the parser found, as the writers need it
      Throws:
      GeneratorException