flow

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Flow Type Checking

Flow类型检查

Arguments:
  • $ARGUMENTS: Renderer to check (default: dom-node)
参数:
  • $ARGUMENTS:要检查的渲染器(默认值:dom-node)

Renderers

渲染器

RendererWhen to Use
dom-node
Default, recommended for most changes
dom-browser
Browser-specific DOM code
native
React Native
fabric
React Native Fabric
渲染器使用场景
dom-node
默认选项,推荐用于大多数变更
dom-browser
浏览器专属DOM代码
native
React Native
fabric
React Native Fabric

Instructions

操作步骤

  1. Run
    yarn flow $ARGUMENTS
    (use
    dom-node
    if no argument)
  2. Report type errors with file locations
  3. For comprehensive checking (slow), use
    yarn flow-ci
  1. 运行
    yarn flow $ARGUMENTS
    (如果没有参数则使用
    dom-node
  2. 报告包含文件位置的类型错误
  3. 如需全面检查(速度较慢),请使用
    yarn flow-ci

Common Mistakes

常见错误

  • Running without a renderer - Always specify or use default
    dom-node
  • Ignoring suppressions - Check if
    $FlowFixMe
    comments are masking real issues
  • Missing type imports - Ensure types are imported from the correct package
  • 未指定渲染器运行 - 请始终指定渲染器或使用默认的
    dom-node
  • 忽略抑制标记 - 检查
    $FlowFixMe
    注释是否掩盖了真实问题
  • 缺少类型导入 - 确保从正确的包中导入类型