# Mixin: traversalMethods

## traversalMethods

Source:
  - collections/JSXElement.js, line 131

### Methods

#### (static) childElements() → {JSXElementCollection}

Returns all children that are JSXElements.

Source:
  - collections/JSXElement.js, line 155

##### Returns:

Type
  JSXElementCollection

#### (static) childNodes() → {Collection}

Returns all child nodes, including literals and expressions.

Source:
  - collections/JSXElement.js, line 138

##### Returns:

Type
  Collection

#### (static) closest() → {Collection}

Traverse the AST up and finds the closest node of the provided type.

##### Parameters:

Type | Description
--- | ---
Collection |
filter |

Source:
  - collections/Node.js, line 78

##### Returns:

Type
  Collection

#### (static) closestScope() → {Collection}

Returns a collection containing the paths that create the scope of the currently selected paths. Dedupes the paths.

Source:
  - collections/Node.js, line 67

##### Returns:

Type
  Collection

#### (static) find() → {Collection}

Find nodes of a specific type within the nodes of this collection.

##### Parameters:

Type | Description
--- | ---
type |
filter |

Source:
  - collections/Node.js, line 34

##### Returns:

Type
  Collection

#### (static) getVariableDeclarators(nameGetter) → {Collection}

Finds the declaration for each selected path. Useful for member expressions or JSXElements. Expects a callback function that maps each path to the name to look for. If the callback returns a falsey value, the element is skipped.

##### Parameters:

Name | Type | Description
--- | --- | ---
`nameGetter` | function |

Source:
  - collections/Node.js, line 105

##### Returns:

Type
  Collection

## traversalMethods

Source:
  - collections/Node.js, line 25

### Methods

#### (static) childElements() → {JSXElementCollection}

Returns all children that are JSXElements.

Source:
  - collections/JSXElement.js, line 155

##### Returns:

Type
  JSXElementCollection

#### (static) childNodes() → {Collection}

Returns all child nodes, including literals and expressions.

Source:
  - collections/JSXElement.js, line 138

##### Returns:

Type
  Collection

#### (static) closest() → {Collection}

Traverse the AST up and finds the closest node of the provided type.

##### Parameters:

Type | Description
--- | ---
Collection |
filter |

Source:
  - collections/Node.js, line 78

##### Returns:

Type
  Collection

#### (static) closestScope() → {Collection}

Returns a collection containing the paths that create the scope of the currently selected paths. Dedupes the paths.

Source:
  - collections/Node.js, line 67

##### Returns:

Type
  Collection

#### (static) find() → {Collection}

Find nodes of a specific type within the nodes of this collection.

##### Parameters:

Type | Description
--- | ---
type |
filter |

Source:
  - collections/Node.js, line 34

##### Returns:

Type
  Collection

#### (static) getVariableDeclarators(nameGetter) → {Collection}

Finds the declaration for each selected path. Useful for member expressions or JSXElements. Expects a callback function that maps each path to the name to look for. If the callback returns a falsey value, the element is skipped.

##### Parameters:

Name | Type | Description
--- | --- | ---
`nameGetter` | function |

Source:
  - collections/Node.js, line 105

##### Returns:

Type
  Collection