/* eslint-disable alidocs/catch-call-function */
/**
 * Executes a given operation type.
 * @param {String} type
 * @return {Boolean}
 */
export default function command(type: string): Boolean {
  try {
    return document.execCommand(type);
  } catch (e) {
    return false;
  }
}
