vimeo/psalm

intersection types and conditional types

Open

#6,942 创建于 2021年11月18日

在 GitHub 查看
 (18 评论) (0 反应) (0 负责人)PHP (668 fork)batch import
Help wantedenhancementparser

仓库指标

Star
 (5,369 star)
PR 合并指标
 (平均合并 3天 12小时) (30 天内合并 5 个 PR)

描述

consider https://psalm.dev/r/8e871b2851

two things:

  • the parser forces me to use parentheses around the intersection type. I would not expect that to be needed
  • since from the condition we know that A is an array, I don't see why A&array should be forbidden

贡献者指南