createOnlyOAS31Selector =
  (selector) =>
  (state, ...args) =>
  (system) => {
    if (system.getSystem().specSelectors.isOAS31()) {
      const selectedValue = selector(state, ...args)
      return typeof selectedValue === "function"
        ? selectedValue(system)
        : selectedValue
    } else {
      return null
    }
  }
Creates selector that returns value of the passed
selector when spec is OpenAPI 3.1.0., null otherwise.

@param selector
@returns {function(*, ...[*]): function(*): (*|null)}