UNPKG

2.9 kBTypeScriptView Raw
1import { TSESTree } from '../../ts-estree';
2declare type IsSpecificTokenFunction<SpecificToken extends TSESTree.Token> = (token: TSESTree.Token) => token is SpecificToken;
3declare type IsNotSpecificTokenFunction<SpecificToken extends TSESTree.Token> = (token: TSESTree.Token) => token is Exclude<TSESTree.Token, SpecificToken>;
4declare type PunctuatorTokenWithValue<Value extends string> = TSESTree.PunctuatorToken & {
5 value: Value;
6};
7declare type IsPunctuatorTokenWithValueFunction<Value extends string> = IsSpecificTokenFunction<PunctuatorTokenWithValue<Value>>;
8declare type IsNotPunctuatorTokenWithValueFunction<Value extends string> = IsNotSpecificTokenFunction<PunctuatorTokenWithValue<Value>>;
9declare const isArrowToken: IsPunctuatorTokenWithValueFunction<"=>">;
10declare const isNotArrowToken: IsNotPunctuatorTokenWithValueFunction<"=>">;
11declare const isClosingBraceToken: IsPunctuatorTokenWithValueFunction<"}">;
12declare const isNotClosingBraceToken: IsNotPunctuatorTokenWithValueFunction<"}">;
13declare const isClosingBracketToken: IsPunctuatorTokenWithValueFunction<"]">;
14declare const isNotClosingBracketToken: IsNotPunctuatorTokenWithValueFunction<"]">;
15declare const isClosingParenToken: IsPunctuatorTokenWithValueFunction<")">;
16declare const isNotClosingParenToken: IsNotPunctuatorTokenWithValueFunction<")">;
17declare const isColonToken: IsPunctuatorTokenWithValueFunction<":">;
18declare const isNotColonToken: IsNotPunctuatorTokenWithValueFunction<":">;
19declare const isCommaToken: IsPunctuatorTokenWithValueFunction<",">;
20declare const isNotCommaToken: IsNotPunctuatorTokenWithValueFunction<",">;
21declare const isCommentToken: IsSpecificTokenFunction<TSESTree.Comment>;
22declare const isNotCommentToken: IsNotSpecificTokenFunction<TSESTree.Comment>;
23declare const isOpeningBraceToken: IsPunctuatorTokenWithValueFunction<"{">;
24declare const isNotOpeningBraceToken: IsNotPunctuatorTokenWithValueFunction<"{">;
25declare const isOpeningBracketToken: IsPunctuatorTokenWithValueFunction<"[">;
26declare const isNotOpeningBracketToken: IsNotPunctuatorTokenWithValueFunction<"[">;
27declare const isOpeningParenToken: IsPunctuatorTokenWithValueFunction<"(">;
28declare const isNotOpeningParenToken: IsNotPunctuatorTokenWithValueFunction<"(">;
29declare const isSemicolonToken: IsPunctuatorTokenWithValueFunction<";">;
30declare const isNotSemicolonToken: IsNotPunctuatorTokenWithValueFunction<";">;
31export { isArrowToken, isClosingBraceToken, isClosingBracketToken, isClosingParenToken, isColonToken, isCommaToken, isCommentToken, isNotArrowToken, isNotClosingBraceToken, isNotClosingBracketToken, isNotClosingParenToken, isNotColonToken, isNotCommaToken, isNotCommentToken, isNotOpeningBraceToken, isNotOpeningBracketToken, isNotOpeningParenToken, isNotSemicolonToken, isOpeningBraceToken, isOpeningBracketToken, isOpeningParenToken, isSemicolonToken, };
32//# sourceMappingURL=predicates.d.ts.map
\No newline at end of file