code: function resolveExpression(expression) {
      // return empty string for undefined
      if (expression === undefined) {
          return "";
      }
      // return placeholder for promise
      if (isPromise(expression)) {
          // recursively resolve
          return "[promise]";
      }
      // return placeholder for function
      if (typeof expression === "function") {
          return "[function]";
      }
      // handle arrays
      if (Array.isArray(expression)) {
          var items = [];
          // resolve each item (might be promises as well)
          for (var _i = 0, expression_1 = expression; _i < expression_1.length; _i++) {
              var expressionItem = expression_1[_i];
              items.push(resolveExpression(expressionItem));
          }
          // join with newline
          return items.join("\n");
      }
      // return unmodified if got a string
      if (typeof expression === "string") {
          return expression;
      }
      // convert to string if got a number
      if (typeof expression === "number") {
          return expression.toString();
      }
      // return stringified value, handles circular references
      return flatted_1.stringify(expression, undefined, 2);
  }
docs: resolves a concatenatable expression to a string (async)