vimeo/psalm

intersection types and conditional types

Open

#6,942 opened on 2021年11月18日

GitHub で見る
 (18 comments) (0 reactions) (0 assignees)PHP (668 forks)batch import
Help wantedenhancementparser

Repository metrics

Stars
 (5,369 stars)
PR merge metrics
 (平均マージ 3d 12h) (30d で 5 merged PRs)

説明

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

コントリビューターガイド