vimeo/psalm

intersection types and conditional types

Open

#6.942 aberto em 18 de nov. de 2021

Ver no GitHub
 (18 comments) (0 reactions) (0 assignees)PHP (668 forks)batch import
Help wantedenhancementparser

Métricas do repositório

Stars
 (5.369 stars)
Métricas de merge de PR
 (Mesclagem média 3d 12h) (5 fundiu PRs em 30d)

Description

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

Guia do colaborador