Make asserts property boolean, not undefined (#12167)

This commit is contained in:
Sosuke Suzuki
2020-10-14 06:56:08 +09:00
committed by GitHub
parent d49e5507ae
commit a5bed04f55
3 changed files with 11 additions and 8 deletions

View File

@@ -1039,7 +1039,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
const t: N.TsTypeAnnotation = this.startNode();
this.expect(returnToken);
const asserts = this.tsTryParse(
const asserts = !!this.tsTryParse(
this.tsParseTypePredicateAsserts.bind(this),
);