function parseType (props) {
  const {
    current
  } = props

  // 抛出错误信息
  const throwErrorMsg = type => {
    throw new TypeError(type + ' must be number')
  }

  if (current) isNumber(current) ? '' : throwErrorMsg('current')
}
function parseType (props) {
  const {
    current
  } = props

  // 抛出错误信息
  const throwErrorMsg = type => {
    throw new TypeError(type + ' must be number')
  }

  if (current) isNumber(current) ? '' : throwErrorMsg('current')
}
function parseType ( props ) { const { current } = props // 抛出错误信息 const throwErrorMsg = type => { throw new TypeError ( type + ' must be number' ) } if ( current ) isNumber ( current ) ? '' : throwErrorMsg ( 'current' ) }
props 类型检测

@param {Object} props
props 类型检测
parse type