src/adapter.js
function validateOptionsConstraints(optionsConstraints) {
  if (optionsConstraints.within &&
    !(optionsConstraints.within === 'interactive_message' ||
      optionsConstraints.within === 'block_actions' ||
      optionsConstraints.within === 'dialog')
  ) {
    return new TypeError('Within must be \'block_actions\', \'interactive_message\' or \'dialog\'');
  }

  // We don't need to validate unfurl, we'll just cooerce it to a boolean
  return false;
}
function validateOptionsConstraints(optionsConstraints) {
  if (optionsConstraints.within &&
    !(optionsConstraints.within === 'interactive_message' ||
      optionsConstraints.within === 'block_actions' ||
      optionsConstraints.within === 'dialog')
  ) {
    return new TypeError('Within must be \'block_actions\', \'interactive_message\' or \'dialog\'');
  }

  // We don't need to validate unfurl, we'll just cooerce it to a boolean
  return false;
}
function validateOptionsConstraints ( optionsConstraints ) { if ( optionsConstraints . within && ! ( optionsConstraints . within === 'interactive_message' || optionsConstraints . within === 'block_actions' || optionsConstraints . within === 'dialog' ) ) { return new TypeError ( 'Within must be \'block_actions\', \'interactive_message\' or \'dialog\'' ) ; } // We don't need to validate unfurl, we'll just cooerce it to a boolean return false ; }
Validates properties of a matching constraints object specific to registering an options request
@param {Object} matchingConstraints - object describing the constraints on a callback
@returns {Error|false} - a false value represents successful validation, otherwise an error to
describe why validation failed.
@private
Validates properties of a matching constraints object specific to registering an options request