In the code:
interface I<T=any>{
m(i: number, g: (aParameter1: number)=>void)
}
I expect that InterfaceDeclaration > :nth-child(1) to match only one node (since any node cannot have more than one child that is the first one) but is matching 3 nodes. The same happens with all :first-child, :last-child, etc.
Another example, in the code:
function f(){
var a = 1
function g(){var a=1}
}
This selector SourceFile>FunctionDeclaration:has([name="f"])>Block>*>*>*>*>VariableDeclaration matches only one child as expected, but this one (just replace VariableDeclaration with :first-child) matches 2 nodes.
It's like whenever you use :first-child or cia, the previous '>' (direct child ) is not taking in account and replaced by " " (ancestor)
I would like to know if this is the expected behavior and if not if you would accept a PR for this (supposing is simple to fix) ?
Thanks, keep it up!