As a minimal example; if we extend the ClockConstructor interface from the TypeScript documentation with an overload, so that there is something to sort, we get a crash when sorting uses getPropertyName(node) which attempts to read node.key.name, which fails on TSConstructSignatureDeclaration nodes.
Example code to lint:
interface ClockConstructor {
new (hour: number, minute: number): ClockInterface;
new (hour: number): ClockInterface;
}
interface ClockInterface {
tick(): void;
}
Depending on the preferred order wrt. constructor declarations, perhaps replacing the line
As a minimal example; if we extend the
ClockConstructor
interface from the TypeScript documentation with an overload, so that there is something to sort, we get a crash when sorting usesgetPropertyName(node)
which attempts to readnode.key.name
, which fails onTSConstructSignatureDeclaration
nodes.Example code to lint:
Depending on the preferred order wrt. constructor declarations, perhaps replacing the line
in
getPropertyName
withwould be a reasonable solution?