Home / Function/ isPrimitiveBinaryOp() — react Function Reference

isPrimitiveBinaryOp() — react Function Reference

Architecture documentation for the isPrimitiveBinaryOp() function in InferTypes.ts from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  319fe2c1_527d_8fac_f8b6_a96a08bc06aa["isPrimitiveBinaryOp()"]
  35147ed6_ce97_e85f_570c_faf2d25f42f4["InferTypes.ts"]
  319fe2c1_527d_8fac_f8b6_a96a08bc06aa -->|defined in| 35147ed6_ce97_e85f_570c_faf2d25f42f4
  b282c6e8_cb4e_aa17_9bb5_f36ea62991f4["generateInstructionTypes()"]
  b282c6e8_cb4e_aa17_9bb5_f36ea62991f4 -->|calls| 319fe2c1_527d_8fac_f8b6_a96a08bc06aa
  style 319fe2c1_527d_8fac_f8b6_a96a08bc06aa fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/packages/babel-plugin-react-compiler/src/TypeInference/InferTypes.ts lines 42–64

function isPrimitiveBinaryOp(op: t.BinaryExpression['operator']): boolean {
  switch (op) {
    case '+':
    case '-':
    case '/':
    case '%':
    case '*':
    case '**':
    case '&':
    case '|':
    case '>>':
    case '<<':
    case '^':
    case '>':
    case '<':
    case '>=':
    case '<=':
    case '|>':
      return true;
    default:
      return false;
  }
}

Subdomains

Frequently Asked Questions

What does isPrimitiveBinaryOp() do?
isPrimitiveBinaryOp() is a function in the react codebase, defined in compiler/packages/babel-plugin-react-compiler/src/TypeInference/InferTypes.ts.
Where is isPrimitiveBinaryOp() defined?
isPrimitiveBinaryOp() is defined in compiler/packages/babel-plugin-react-compiler/src/TypeInference/InferTypes.ts at line 42.
What calls isPrimitiveBinaryOp()?
isPrimitiveBinaryOp() is called by 1 function(s): generateInstructionTypes.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free