function toFunction(obj) {
  let styleFunction;

  if (typeof obj === 'function') {
    styleFunction = obj;
  } else {
    /**
     * @type {Array<Style>}
     */
    let styles;
    if (Array.isArray(obj)) {
      styles = obj;
    } else {
      assert(typeof (/** @type {?} */ (obj).getZIndex) === 'function', 41); // Expected an `Style` or an array of `Style`
      const style = /** @type {Style} */ (obj);
      styles = [style];
    }
    styleFunction = function () {
      return styles;
    };
  }
  return styleFunction;
}
/**
 * Convert the provided object into a style function.  Functions passed through
 * unchanged.  Arrays of Style or single style objects wrapped in a
 * new style function.
 * @param {StyleFunction|Array<Style>|Style} obj
 *     A style function, a single style, or an array of styles.
 * @return {StyleFunction} A style function.
 */
Convert the provided object into a style function.  Functions passed through
unchanged.  Arrays of Style or single style objects wrapped in a
new style function.
Convert the provided object into a style function . Functions passed through unchanged . Arrays of Style or single style objects wrapped in a new style function .
function toFunction(obj) {
  let styleFunction;
  if (typeof obj === 'function') {
    styleFunction = obj;
  } else {
    let styles;
    if (Array.isArray(obj)) {
      styles = obj;
    } else {
      assert(typeof ( (obj).getZIndex) === 'function', 41); 
      const style =  (obj);
      styles = [style];
    }
    styleFunction = function () {
      return styles;
    };
  }
  return styleFunction;
}
function toFunction ( obj ) { let styleFunction ; if ( typeof obj === 'function' ) { styleFunction = obj ; } else { let styles ; if ( Array . isArray ( obj ) ) { styles = obj ; } else { assert ( typeof ( ( obj ) . getZIndex ) === 'function' , 41 ) ; const style = ( obj ) ; styles = [ style ] ; } styleFunction = function ( ) { return styles ; } ; } return styleFunction ; }
Convert the provided object into a style function.
Convert the provided object into a style function .
/**
     * @type {Array<Style>}
     */ /** @type {?} */ // Expected an `Style` or an array of `Style` /** @type {Style} */