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