code-path-segment.js — react Source File
Architecture documentation for code-path-segment.js, a javascript file in the react codebase.
Entity Profile
Relationship Graph
Source Code
'use strict';
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Checks whether or not a given segment is reachable.
* @param {CodePathSegment} segment A segment to check.
* @returns {boolean} `true` if the segment is reachable.
*/
function isReachable(segment) {
return segment.reachable;
}
//------------------------------------------------------------------------------
// Public Interface
//------------------------------------------------------------------------------
/**
* A code path segment.
*/
class CodePathSegment {
/**
* @param {string} id An identifier.
* @param {CodePathSegment[]} allPrevSegments An array of the previous segments.
* This array includes unreachable segments.
* @param {boolean} reachable A flag which shows this is reachable.
*/
constructor(id, allPrevSegments, reachable) {
/**
* The identifier of this code path.
* Rules use it to store additional information of each rule.
* @type {string}
*/
this.id = id;
/**
* An array of the next segments.
* @type {CodePathSegment[]}
*/
this.nextSegments = [];
/**
* An array of the previous segments.
* @type {CodePathSegment[]}
*/
this.prevSegments = allPrevSegments.filter(isReachable);
/**
* An array of the next segments.
* This array includes unreachable segments.
* @type {CodePathSegment[]}
*/
this.allNextSegments = [];
// ... (166 more lines)
Domain
Subdomains
Functions
Classes
Source
Frequently Asked Questions
What does code-path-segment.js do?
code-path-segment.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in code-path-segment.js?
code-path-segment.js defines 1 function(s): isReachable.
Where is code-path-segment.js in the architecture?
code-path-segment.js is located at packages/eslint-plugin-react-hooks/src/code-path-analysis/code-path-segment.js (domain: BabelCompiler, subdomain: Validation, directory: packages/eslint-plugin-react-hooks/src/code-path-analysis).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free