[ts]Set false to default value of TsTypePredicate.asserts (#12352)
This commit is contained in:
parent
56fd90452c
commit
a4e4aede14
@ -357,6 +357,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
|
|||||||
const node: N.TsTypePredicate = this.startNodeAtNode(lhs);
|
const node: N.TsTypePredicate = this.startNodeAtNode(lhs);
|
||||||
node.parameterName = lhs;
|
node.parameterName = lhs;
|
||||||
node.typeAnnotation = this.tsParseTypeAnnotation(/* eatColon */ false);
|
node.typeAnnotation = this.tsParseTypeAnnotation(/* eatColon */ false);
|
||||||
|
node.asserts = false;
|
||||||
return this.finishNode(node, "TSTypePredicate");
|
return this.finishNode(node, "TSTypePredicate");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1262,7 +1262,7 @@ export type TsTypePredicate = TsTypeBase & {
|
|||||||
type: "TSTypePredicate",
|
type: "TSTypePredicate",
|
||||||
parameterName: Identifier | TsThisType,
|
parameterName: Identifier | TsThisType,
|
||||||
typeAnnotation: TsTypeAnnotation,
|
typeAnnotation: TsTypeAnnotation,
|
||||||
asserts?: boolean,
|
asserts: boolean,
|
||||||
};
|
};
|
||||||
|
|
||||||
// `typeof` operator
|
// `typeof` operator
|
||||||
|
|||||||
@ -52,7 +52,8 @@
|
|||||||
"type": "TSStringKeyword",
|
"type": "TSStringKeyword",
|
||||||
"start":31,"end":37,"loc":{"start":{"line":2,"column":19},"end":{"line":2,"column":25}}
|
"start":31,"end":37,"loc":{"start":{"line":2,"column":19},"end":{"line":2,"column":25}}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"asserts": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"body": {
|
"body": {
|
||||||
@ -92,7 +93,8 @@
|
|||||||
"type": "TSStringKeyword",
|
"type": "TSStringKeyword",
|
||||||
"start":66,"end":72,"loc":{"start":{"line":4,"column":22},"end":{"line":4,"column":28}}
|
"start":66,"end":72,"loc":{"start":{"line":4,"column":22},"end":{"line":4,"column":28}}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"asserts": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"id": null,
|
"id": null,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user