function isDeclared(variableData, isDefault, ignoreDefaults) {
      if (isDefault) {
        if (Number.isFinite(ignoreDefaults)) {
          return variableData.defaultCount >= ignoreDefaults;
        } else if (ignoreDefaults) {
          return false;
        }
      }

      return variableData.isDeclared;
    }
Checks whether the given [variableData] is declared.
@param {{ defaultCount: number; isDeclared: boolean; }} variableData the variable data
containing default count and if the variable is declared.
@param {boolean} isDefault if the variable contains the `!default` keyword.
@param {boolean | number} ignoreDefaults the ignore defaults options.
@returns true if declared.