check return type of this type predicates (#57341)

This commit is contained in:
Zzzen
2024-04-09 04:37:24 +08:00
committed by GitHub
parent 13e64740c9
commit f608fc0a10
9 changed files with 535 additions and 3 deletions
+2 -2
View File
@@ -591,7 +591,7 @@ export class LineNode implements LineCollection {
if (children.length) this.updateCounts();
}
isLeaf() {
isLeaf(): this is LineLeaf {
return false;
}
@@ -839,7 +839,7 @@ export class LineLeaf implements LineCollection {
constructor(public text: string) {
}
isLeaf() {
isLeaf(): this is LineLeaf {
return true;
}