demo/typescript.js
function parseTypeReferenceOrTypePredicate() {
            var typeName = parseEntityName(/*allowReservedWords*/ false, ts.Diagnostics.Type_expected);
            if (typeName.kind === 69 /* Identifier */ && token === 124 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) {
                nextToken();
                var node_1 = createNode(150 /* TypePredicate */, typeName.pos);
                node_1.parameterName = typeName;
                node_1.type = parseType();
                return finishNode(node_1);
            }
            var node = createNode(151 /* TypeReference */, typeName.pos);
            node.typeName = typeName;
            if (!scanner.hasPrecedingLineBreak() && token === 25 /* LessThanToken */) {
                node.typeArguments = parseBracketedList(18 /* TypeArguments */, parseType, 25 /* LessThanToken */, 27 /* GreaterThanToken */);
            }
            return finishNode(node);
        }
function parseTypeReferenceOrTypePredicate() {
            var typeName = parseEntityName(/*allowReservedWords*/ false, ts.Diagnostics.Type_expected);
            if (typeName.kind === 69 /* Identifier */ && token === 124 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) {
                nextToken();
                var node_1 = createNode(150 /* TypePredicate */, typeName.pos);
                node_1.parameterName = typeName;
                node_1.type = parseType();
                return finishNode(node_1);
            }
            var node = createNode(151 /* TypeReference */, typeName.pos);
            node.typeName = typeName;
            if (!scanner.hasPrecedingLineBreak() && token === 25 /* LessThanToken */) {
                node.typeArguments = parseBracketedList(18 /* TypeArguments */, parseType, 25 /* LessThanToken */, 27 /* GreaterThanToken */);
            }
            return finishNode(node);
        }
TYPES