Class JavaScriptParser.Builder

java.lang.Object
org.openrewrite.Parser.Builder
org.openrewrite.javascript.JavaScriptParser.Builder
All Implemented Interfaces:
Cloneable
Enclosing class:
JavaScriptParser

public static class JavaScriptParser.Builder extends org.openrewrite.Parser.Builder
  • Method Details

    • maxSizeBytes

      public JavaScriptParser.Builder maxSizeBytes(long maxSizeBytes)
      Set the maximum file size (in bytes) for files to be parsed as JavaScript/TypeScript. Files exceeding this size will be parsed as plain text to avoid performance issues. An example of such a huge file (>100k lines of code) is in deno.
      Parameters:
      maxSizeBytes - The maximum size of a file in bytes that will be parsed as JavaScript.
      Returns:
      This builder.
    • build

      public JavaScriptParser build()
      Specified by:
      build in class org.openrewrite.Parser.Builder
    • getDslName

      public String getDslName()
      Specified by:
      getDslName in class org.openrewrite.Parser.Builder