You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exportfunctionisExportModifier(node: Modifier): node is ExportKeyword{
820
-
returnnode.kind===SyntaxKind.ExportKeyword;
818
+
exportconstisTypeNodeOrTypeParameterDeclaration=or(isTypeNode,isTypeParameterDeclaration)as(node: Node)=>node is TypeNode|TypeParameterDeclaration;
819
+
exportconstisQuestionOrExclamationToken=or(isQuestionToken,isExclamationToken)as(node: Node)=>node is QuestionToken|ExclamationToken;
820
+
exportconstisIdentifierOrThisTypeNode=or(isIdentifier,isThisTypeNode)as(node: Node)=>node is Identifier|ThisTypeNode;
821
+
exportconstisReadonlyKeywordOrPlusOrMinusToken=or(isReadonlyKeyword,isPlusToken,isMinusToken)as(node: Node)=>node is ReadonlyKeyword|PlusToken|MinusToken;
822
+
exportconstisQuestionOrPlusOrMinusToken=or(isQuestionToken,isPlusToken,isMinusToken)as(node: Node)=>node is QuestionToken|PlusToken|MinusToken;
823
+
exportconstisModuleName=or(isIdentifier,isStringLiteral)as(node: Node)=>node is ModuleName;
824
+
825
+
exportfunctionisLiteralTypeLikeExpression(node: Node): node is NullLiteral|BooleanLiteral|LiteralExpression|PrefixUnaryExpression{
826
+
constkind=node.kind;
827
+
returnkind===SyntaxKind.NullKeyword
828
+
||kind===SyntaxKind.TrueKeyword
829
+
||kind===SyntaxKind.FalseKeyword
830
+
||isLiteralExpression(node)
831
+
||isPrefixUnaryExpression(node);
821
832
}
822
833
823
-
/* @internal */
824
-
exportfunctionisAsyncModifier(node: Modifier): node is AsyncKeyword{
825
-
returnnode.kind===SyntaxKind.AsyncKeyword;
834
+
functionisExponentiationOperator(kind: SyntaxKind): kind is ExponentiationOperator{
835
+
returnkind===SyntaxKind.AsteriskAsteriskToken;
826
836
}
827
837
828
-
/* @internal */
829
-
exportfunctionisStaticModifier(node: Modifier): node is StaticKeyword{
830
-
returnnode.kind===SyntaxKind.StaticKeyword;
838
+
functionisMultiplicativeOperator(kind: SyntaxKind): kind is MultiplicativeOperator{
839
+
returnkind===SyntaxKind.AsteriskToken
840
+
||kind===SyntaxKind.SlashToken
841
+
||kind===SyntaxKind.PercentToken;
842
+
}
843
+
844
+
functionisMultiplicativeOperatorOrHigher(kind: SyntaxKind): kind is MultiplicativeOperatorOrHigher{
845
+
returnisExponentiationOperator(kind)
846
+
||isMultiplicativeOperator(kind);
847
+
}
848
+
849
+
functionisAdditiveOperator(kind: SyntaxKind): kind is AdditiveOperator{
850
+
returnkind===SyntaxKind.PlusToken
851
+
||kind===SyntaxKind.MinusToken;
852
+
}
853
+
854
+
functionisAdditiveOperatorOrHigher(kind: SyntaxKind): kind is AdditiveOperatorOrHigher{
855
+
returnisAdditiveOperator(kind)
856
+
||isMultiplicativeOperatorOrHigher(kind);
857
+
}
858
+
859
+
functionisShiftOperator(kind: SyntaxKind): kind is ShiftOperator{
0 commit comments