static executeKotlinCode(
    code,
    compilerVersion,
    platform,
    args,
    theme,
    hiddenDependencies,
    onTestPassed,
    onTestFailed,
  ) {
    return executeCode(
      API_URLS.COMPILE(platform, compilerVersion),
      code,
      compilerVersion,
      platform,
      args,
      hiddenDependencies,
    ).then(function (data) {
      let output = '';
      let errorsAndWarnings = flatten(Object.values(data.errors));
      let errors = errorsAndWarnings.filter(
        (error) => error.severity === 'ERROR',
      );
      if (errors.length > 0) {
        output = processErrors(errors, theme);
      } else {
        switch (platform) {
          case TargetPlatforms.JAVA:
            if (data.text) output = processJVMOutput(data.text, theme);
            break;
          case TargetPlatforms.JUNIT:
            data.testResults
              ? (output = processJUnitResults(
                  data.testResults,
                  onTestPassed,
                  onTestFailed,
                ))
              : (output = processJVMOutput(data.text || '', theme));
            break;
        }
      }
      let exceptions = null;
      if (data.exception != null) {
        exceptions = findSecurityException(data.exception);
        exceptions.causes = getExceptionCauses(exceptions);
        exceptions.cause = undefined;
      }
      return {
        errors: errorsAndWarnings,
        output: output,
        exception: exceptions,
      };
    });
  }
Request on execute Kotlin code.

@param code            - string
@param compilerVersion - string kotlin compiler
@param platform        - TargetPlatform
@param args            - command line arguments
@param theme           - theme of editor
@param onTestPassed    - function will call after test's passed
@param onTestFailed    - function will call after test's failed
@param hiddenDependencies   - read only additional files
@returns {*|PromiseLike<T>|Promise<T>}