typeName() — react Function Reference
Architecture documentation for the typeName() function in CheckStringCoercion.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 1d6da2c5_1e9c_6d2c_a9f9_fc5b6c4da549["typeName()"] 5c0b3019_dcaa_8f32_5625_55fc821f3139["CheckStringCoercion.js"] 1d6da2c5_1e9c_6d2c_a9f9_fc5b6c4da549 -->|defined in| 5c0b3019_dcaa_8f32_5625_55fc821f3139 30714f15_7ce0_0f94_1797_10d66ae1061f["checkAttributeStringCoercion()"] 30714f15_7ce0_0f94_1797_10d66ae1061f -->|calls| 1d6da2c5_1e9c_6d2c_a9f9_fc5b6c4da549 89d324a1_84f4_d469_eb90_dc13334fccf2["checkKeyStringCoercion()"] 89d324a1_84f4_d469_eb90_dc13334fccf2 -->|calls| 1d6da2c5_1e9c_6d2c_a9f9_fc5b6c4da549 9caeb0ae_5fc0_62bf_c545_c6050e839e69["checkPropStringCoercion()"] 9caeb0ae_5fc0_62bf_c545_c6050e839e69 -->|calls| 1d6da2c5_1e9c_6d2c_a9f9_fc5b6c4da549 afe62f4e_90b7_e041_1e6a_3267c1de71cb["checkOptionStringCoercion()"] afe62f4e_90b7_e041_1e6a_3267c1de71cb -->|calls| 1d6da2c5_1e9c_6d2c_a9f9_fc5b6c4da549 364b4fbe_73f3_5047_681c_9b3df7648edc["checkCSSPropertyStringCoercion()"] 364b4fbe_73f3_5047_681c_9b3df7648edc -->|calls| 1d6da2c5_1e9c_6d2c_a9f9_fc5b6c4da549 7c501fbc_77a4_a9c9_ca5f_902cd801d38a["checkHtmlStringCoercion()"] 7c501fbc_77a4_a9c9_ca5f_902cd801d38a -->|calls| 1d6da2c5_1e9c_6d2c_a9f9_fc5b6c4da549 017690c4_1988_dc4b_cfe1_9bde36137812["checkFormFieldValueStringCoercion()"] 017690c4_1988_dc4b_cfe1_9bde36137812 -->|calls| 1d6da2c5_1e9c_6d2c_a9f9_fc5b6c4da549 style 1d6da2c5_1e9c_6d2c_a9f9_fc5b6c4da549 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/shared/CheckStringCoercion.js lines 21–32
function typeName(value: mixed): string {
if (__DEV__) {
// toStringTag is needed for namespaced types like Temporal.Instant
const hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
const type =
(hasToStringTag && (value: any)[Symbol.toStringTag]) ||
(value: any).constructor.name ||
'Object';
// $FlowFixMe[incompatible-return]
return type;
}
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does typeName() do?
typeName() is a function in the react codebase, defined in packages/shared/CheckStringCoercion.js.
Where is typeName() defined?
typeName() is defined in packages/shared/CheckStringCoercion.js at line 21.
What calls typeName()?
typeName() is called by 7 function(s): checkAttributeStringCoercion, checkCSSPropertyStringCoercion, checkFormFieldValueStringCoercion, checkHtmlStringCoercion, checkKeyStringCoercion, checkOptionStringCoercion, checkPropStringCoercion.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free