Home / File/ ComponentDeclaration.ts — react Source File

ComponentDeclaration.ts — react Source File

Architecture documentation for ComponentDeclaration.ts, a typescript file in the react codebase. 1 imports, 1 dependents.

File typescript BabelCompiler Validation 1 imports 1 dependents 2 functions

Entity Profile

Dependency Diagram

graph LR
  4d5127e7_7f7a_8639_b8da_3ebfa02a4a0b["ComponentDeclaration.ts"]
  52e3d8d7_abf4_7343_1f98_3f701ec04082["types"]
  4d5127e7_7f7a_8639_b8da_3ebfa02a4a0b --> 52e3d8d7_abf4_7343_1f98_3f701ec04082
  9aa4477d_960b_1ea1_b6d9_36076aaa70bd["Program.ts"]
  9aa4477d_960b_1ea1_b6d9_36076aaa70bd --> 4d5127e7_7f7a_8639_b8da_3ebfa02a4a0b
  style 4d5127e7_7f7a_8639_b8da_3ebfa02a4a0b 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 ComponentDeclaration = t.FunctionDeclaration & {
  __componentDeclaration: boolean;
};

export function isComponentDeclaration(
  node: t.FunctionDeclaration,
): node is ComponentDeclaration {
  return Object.prototype.hasOwnProperty.call(node, '__componentDeclaration');
}

export function parseComponentDeclaration(
  node: t.FunctionDeclaration,
): ComponentDeclaration | null {
  return isComponentDeclaration(node) ? node : null;
}

Domain

Subdomains

Dependencies

  • types

Frequently Asked Questions

What does ComponentDeclaration.ts do?
ComponentDeclaration.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 ComponentDeclaration.ts?
ComponentDeclaration.ts defines 2 function(s): isComponentDeclaration, parseComponentDeclaration.
What does ComponentDeclaration.ts depend on?
ComponentDeclaration.ts imports 1 module(s): types.
What files import ComponentDeclaration.ts?
ComponentDeclaration.ts is imported by 1 file(s): Program.ts.
Where is ComponentDeclaration.ts in the architecture?
ComponentDeclaration.ts is located at compiler/packages/babel-plugin-react-compiler/src/Utils/ComponentDeclaration.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