Skip to content

Commit

Permalink
[doc] update jsdoc to use "EnzymeSelector" where applicable
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Dec 11, 2018
1 parent b03e12e commit cc6c3dc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
20 changes: 10 additions & 10 deletions packages/enzyme/src/ReactWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ class ReactWrapper {
/**
* Finds every node in the render tree of the current wrapper that matches the provided selector.
*
* @param {String|Function|Object} selector
* @param {EnzymeSelector} selector
* @returns {ReactWrapper}
*/
find(selector) {
Expand All @@ -508,7 +508,7 @@ class ReactWrapper {
*
* NOTE: can only be called on a wrapper of a single node.
*
* @param {String|Function} selector
* @param {EnzymeSelector} selector
* @returns {boolean}
*/
is(selector) {
Expand Down Expand Up @@ -540,7 +540,7 @@ class ReactWrapper {
* Returns a new wrapper instance with only the nodes of the current wrapper instance that match
* the provided selector.
*
* @param {String|Function} selector
* @param {EnzymeSelector} selector
* @returns {ReactWrapper}
*/
filter(selector) {
Expand All @@ -552,7 +552,7 @@ class ReactWrapper {
* Returns a new wrapper instance with only the nodes of the current wrapper that did not match
* the provided selector. Essentially the inverse of `filter`.
*
* @param {String|Function} selector
* @param {EnzymeSelector} selector
* @returns {ReactWrapper}
*/
not(selector) {
Expand Down Expand Up @@ -714,7 +714,7 @@ class ReactWrapper {
/**
* Returns a new wrapper with all of the children of the current wrapper.
*
* @param {String|Function} [selector]
* @param {EnzymeSelector} [selector]
* @returns {ReactWrapper}
*/
children(selector) {
Expand All @@ -738,7 +738,7 @@ class ReactWrapper {
*
* NOTE: can only be called on a wrapper of a single node.
*
* @param {String|Function} [selector]
* @param {EnzymeSelector} [selector]
* @returns {ReactWrapper}
*/
parents(selector) {
Expand All @@ -759,7 +759,7 @@ class ReactWrapper {

/**
*
* @param {String|Function} selector
* @param {EnzymeSelector} selector
* @returns {ReactWrapper}
*/
closest(selector) {
Expand Down Expand Up @@ -949,7 +949,7 @@ class ReactWrapper {
/**
* Returns whether or not any of the nodes in the wrapper match the provided selector.
*
* @param {Function|String} selector
* @param {EnzymeSelector} selector
* @returns {Boolean}
*/
some(selector) {
Expand All @@ -973,7 +973,7 @@ class ReactWrapper {
/**
* Returns whether or not all of the nodes in the wrapper match the provided selector.
*
* @param {Function|String} selector
* @param {EnzymeSelector} selector
* @returns {Boolean}
*/
every(selector) {
Expand Down Expand Up @@ -1073,7 +1073,7 @@ class ReactWrapper {
* Returns true if the current wrapper has nodes. False otherwise.
* If called with a selector it returns `.find(selector).exists()` instead.
*
* @param {String|Function|Object} selector (optional)
* @param {EnzymeSelector} selector (optional)
* @returns {boolean}
*/
exists(selector = null) {
Expand Down
20 changes: 10 additions & 10 deletions packages/enzyme/src/ShallowWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ class ShallowWrapper {
/**
* Finds every node in the render tree of the current wrapper that matches the provided selector.
*
* @param {String|Function|Object} selector
* @param {EnzymeSelector} selector
* @returns {ShallowWrapper}
*/
find(selector) {
Expand All @@ -752,7 +752,7 @@ class ShallowWrapper {
*
* NOTE: can only be called on a wrapper of a single node.
*
* @param {String|Function} selector
* @param {EnzymeSelector} selector
* @returns {boolean}
*/
is(selector) {
Expand Down Expand Up @@ -785,7 +785,7 @@ class ShallowWrapper {
* Returns a new wrapper instance with only the nodes of the current wrapper instance that match
* the provided selector.
*
* @param {String|Function} selector
* @param {EnzymeSelector} selector
* @returns {ShallowWrapper}
*/
filter(selector) {
Expand All @@ -797,7 +797,7 @@ class ShallowWrapper {
* Returns a new wrapper instance with only the nodes of the current wrapper that did not match
* the provided selector. Essentially the inverse of `filter`.
*
* @param {String|Function} selector
* @param {EnzymeSelector} selector
* @returns {ShallowWrapper}
*/
not(selector) {
Expand Down Expand Up @@ -954,7 +954,7 @@ class ShallowWrapper {
/**
* Returns a new wrapper with all of the children of the current wrapper.
*
* @param {String|Function} [selector]
* @param {EnzymeSelector} [selector]
* @returns {ShallowWrapper}
*/
children(selector) {
Expand All @@ -978,7 +978,7 @@ class ShallowWrapper {
*
* NOTE: can only be called on a wrapper of a single node.
*
* @param {String|Function} [selector]
* @param {EnzymeSelector} [selector]
* @returns {ShallowWrapper}
*/
parents(selector) {
Expand All @@ -999,7 +999,7 @@ class ShallowWrapper {

/**
*
* @param {String|Function} selector
* @param {EnzymeSelector} selector
* @returns {ShallowWrapper}
*/
closest(selector) {
Expand Down Expand Up @@ -1204,7 +1204,7 @@ class ShallowWrapper {
/**
* Returns whether or not any of the nodes in the wrapper match the provided selector.
*
* @param {Function|String} selector
* @param {EnzymeSelector} selector
* @returns {Boolean}
*/
some(selector) {
Expand All @@ -1228,7 +1228,7 @@ class ShallowWrapper {
/**
* Returns whether or not all of the nodes in the wrapper match the provided selector.
*
* @param {Function|String} selector
* @param {EnzymeSelector} selector
* @returns {Boolean}
*/
every(selector) {
Expand Down Expand Up @@ -1329,7 +1329,7 @@ class ShallowWrapper {
* Returns true if the current wrapper has nodes. False otherwise.
* If called with a selector it returns `.find(selector).exists()` instead.
*
* @param {String|Function|Object} selector (optional)
* @param {EnzymeSelector} selector (optional)
* @returns {boolean}
*/
exists(selector = null) {
Expand Down
2 changes: 1 addition & 1 deletion packages/enzyme/src/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ function isComplexSelector(tokens) {
* Takes a component constructor, object, or string representing
* a simple selector and returns a predicate function that can
* be applied to a single node.
* @param {Function|Object|String} selector
* @param {EnzymeSelector} selector
*/
export function buildPredicate(selector) {
// If the selector is a string, parse it as a simple CSS selector
Expand Down

0 comments on commit cc6c3dc

Please sign in to comment.