mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
check return type of this type predicates (#57341)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user