HookDeclaration.ts — react Source File
Architecture documentation for HookDeclaration.ts, a typescript file in the react codebase. 1 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 8ea5bb32_7c01_4152_af7d_185ccbdc3e57["HookDeclaration.ts"] 52e3d8d7_abf4_7343_1f98_3f701ec04082["types"] 8ea5bb32_7c01_4152_af7d_185ccbdc3e57 --> 52e3d8d7_abf4_7343_1f98_3f701ec04082 9aa4477d_960b_1ea1_b6d9_36076aaa70bd["Program.ts"] 9aa4477d_960b_1ea1_b6d9_36076aaa70bd --> 8ea5bb32_7c01_4152_af7d_185ccbdc3e57 style 8ea5bb32_7c01_4152_af7d_185ccbdc3e57 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import * as t from '@babel/types';
export type HookDeclaration = t.FunctionDeclaration & {
__hookDeclaration: boolean;
};
export function isHookDeclaration(
node: t.FunctionDeclaration,
): node is HookDeclaration {
return Object.prototype.hasOwnProperty.call(node, '__hookDeclaration');
}
export function parseHookDeclaration(
node: t.FunctionDeclaration,
): HookDeclaration | null {
return isHookDeclaration(node) ? node : null;
}
Domain
Subdomains
Types
Dependencies
- types
Source
Frequently Asked Questions
What does HookDeclaration.ts do?
HookDeclaration.ts is a source file in the react codebase, written in typescript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in HookDeclaration.ts?
HookDeclaration.ts defines 2 function(s): isHookDeclaration, parseHookDeclaration.
What does HookDeclaration.ts depend on?
HookDeclaration.ts imports 1 module(s): types.
What files import HookDeclaration.ts?
HookDeclaration.ts is imported by 1 file(s): Program.ts.
Where is HookDeclaration.ts in the architecture?
HookDeclaration.ts is located at compiler/packages/babel-plugin-react-compiler/src/Utils/HookDeclaration.ts (domain: BabelCompiler, subdomain: Validation, directory: compiler/packages/babel-plugin-react-compiler/src/Utils).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free