Make parseTypeOrTypePredicate
terser.
This commit is contained in:
parent
9b13a0c5b9
commit
a9f2cb6d6e
|
@ -2541,11 +2541,7 @@ namespace ts {
|
|||
}
|
||||
|
||||
function parseTypeOrTypePredicate(): TypeNode {
|
||||
let typePredicateVariable: Identifier;
|
||||
if (isIdentifier()) {
|
||||
typePredicateVariable = tryParse(parseTypePredicatePrefix);
|
||||
}
|
||||
|
||||
const typePredicateVariable = isIdentifier() && tryParse(parseTypePredicatePrefix);
|
||||
const type = parseType();
|
||||
if (typePredicateVariable) {
|
||||
const node = <TypePredicateNode>createNode(SyntaxKind.TypePredicate, typePredicateVariable.pos);
|
||||
|
|
Loading…
Reference in a new issue