public static <I extends ScriptContext, O> ConfigExpressionScript<I, O> parse(String string,
    ScriptEnvironment<I> description, Class<O> expected) {
    var scriptHost = ScriptHost.newBuilder().registry(new PlanetilerTypeRegistry())
      .build();
    try {
      var scriptBuilder = scriptHost.buildScript(string).withLibraries(
        new StringsLib(),
        new PlanetilerStdLib()
      );
      if (!description.declarations().isEmpty()) {
        scriptBuilder.withDeclarations(description.declarations());
      }
      scriptBuilder.withTypes(GeometryVal.PROTO_TYPE);
      var script = scriptBuilder.build();

      return new ConfigExpressionScript<>(string, script, description, expected);
    } catch (ScriptCreateException e) {
      throw new ParseException(string, e);
    }
  }
Returns an expression parsed from a user-supplied script string that coerces the result to {@code O}.

@throws ParseException if the script failes to compile or type-check
planetiler-custommap/src/main/java/com/onthegomap/planetiler/custommap/expression/ConfigExpressionScript.java