function anyToDiagnostic(input) {
  if (Array.isArray(input)) {
    return input;
  } else if (input instanceof ThrowableDiagnostic) {
    return input.diagnostics;
  } else if (input instanceof Error) {
    return errorToDiagnostic(input);
  } else if (typeof input === 'string') {
    return [{
      message: input
    }];
  } else if (typeof input === 'object') {
    return [input];
  } else {
    return errorToDiagnostic(input);
  }
}
/** Normalize the given value into a diagnostic. */
Normalize the given value into a diagnostic.
Normalize the given value into a diagnostic .
function anyToDiagnostic(input) {
  if (Array.isArray(input)) {
    return input;
  } else if (input instanceof ThrowableDiagnostic) {
    return input.diagnostics;
  } else if (input instanceof Error) {
    return errorToDiagnostic(input);
  } else if (typeof input === 'string') {
    return [{
      message: input
    }];
  } else if (typeof input === 'object') {
    return [input];
  } else {
    return errorToDiagnostic(input);
  }
}
function anyToDiagnostic ( input ) { if ( Array . isArray ( input ) ) { return input ; } else if ( input instanceof ThrowableDiagnostic ) { return input . diagnostics ; } else if ( input instanceof Error ) { return errorToDiagnostic ( input ) ; } else if ( typeof input === 'string' ) { return [ { message : input } ] ; } else if ( typeof input === 'object' ) { return [ input ] ; } else { return errorToDiagnostic ( input ) ; } }
Normalize the given value into a diagnostic.
Normalize the given value into a diagnostic .