propTypes.js — react Source File
Architecture documentation for propTypes.js, a javascript file in the react codebase. 2 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 31cbc56c_6a7f_5784_c119_8fa99f8aca22["propTypes.js"] 4962a421_6f44_376a_ec35_6032e4845540["prop-types"] 31cbc56c_6a7f_5784_c119_8fa99f8aca22 --> 4962a421_6f44_376a_ec35_6032e4845540 4eb12198_9a41_d26c_5aca_d7d500655e3a["semver"] 31cbc56c_6a7f_5784_c119_8fa99f8aca22 --> 4eb12198_9a41_d26c_5aca_d7d500655e3a 14dde3c9_48ef_6e34_3667_978d06aff15d["TestCase.js"] 14dde3c9_48ef_6e34_3667_978d06aff15d --> 31cbc56c_6a7f_5784_c119_8fa99f8aca22 style 31cbc56c_6a7f_5784_c119_8fa99f8aca22 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import PropTypes from 'prop-types';
import semver from 'semver';
export function semverString(props, propName, componentName) {
let version = props[propName];
let error = PropTypes.string(...arguments);
if (!error && version != null && !semver.valid(version))
error = new Error(
`\`${propName}\` should be a valid "semantic version" matching ` +
'an existing React version'
);
return error || null;
}
Domain
Subdomains
Functions
Dependencies
- prop-types
- semver
Imported By
Source
Frequently Asked Questions
What does propTypes.js do?
propTypes.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Optimization subdomain.
What functions are defined in propTypes.js?
propTypes.js defines 1 function(s): semverString.
What does propTypes.js depend on?
propTypes.js imports 2 module(s): prop-types, semver.
What files import propTypes.js?
propTypes.js is imported by 1 file(s): TestCase.js.
Where is propTypes.js in the architecture?
propTypes.js is located at fixtures/dom/src/components/propTypes.js (domain: BabelCompiler, subdomain: Optimization, directory: fixtures/dom/src/components).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free