Skip to content

⬅️ Back to Table of Contents

📄 eslint-utils/predicates

📊 Analysis Summary

Metric Count
📦 Imports 1
📊 Variables & Constants 22
📑 Type Aliases 5

📚 Table of Contents

🛠️ File Location:

📂 packages/utils/src/ast-utils/eslint-utils/predicates.ts

📦 Imports

Name Source
TSESTree ../../ts-estree

Variables & Constants

Name Type Kind Value Exported
isArrowToken IsPunctuatorTokenWithValueFunction<Va... const eslintUtils.isArrowToken as IsPunctuatorTokenWithValueFunction<'=>'> ✓
isNotArrowToken IsNotPunctuatorTokenWithValueFunction... const eslintUtils.isNotArrowToken as IsNotPunctuatorTokenWithValueFunction<'=>'> ✓
isClosingBraceToken IsPunctuatorTokenWithValueFunction<Va... const eslintUtils.isClosingBraceToken as IsPunctuatorTokenWithValueFunction<'}'> ✓
isNotClosingBraceToken IsNotPunctuatorTokenWithValueFunction... const eslintUtils.isNotClosingBraceToken as IsNotPunctuatorTokenWithValueFunction<'}'> ✓
isClosingBracketToken IsPunctuatorTokenWithValueFunction<Va... const eslintUtils.isClosingBracketToken as IsPunctuatorTokenWithValueFunction<']'> ✓
isNotClosingBracketToken IsNotPunctuatorTokenWithValueFunction... const eslintUtils.isNotClosingBracketToken as IsNotPunctuatorTokenWithValueFunction... ✓
isClosingParenToken IsPunctuatorTokenWithValueFunction<Va... const eslintUtils.isClosingParenToken as IsPunctuatorTokenWithValueFunction<')'> ✓
isNotClosingParenToken IsNotPunctuatorTokenWithValueFunction... const eslintUtils.isNotClosingParenToken as IsNotPunctuatorTokenWithValueFunction<')'> ✓
isColonToken IsPunctuatorTokenWithValueFunction<Va... const eslintUtils.isColonToken as IsPunctuatorTokenWithValueFunction<':'> ✓
isNotColonToken IsNotPunctuatorTokenWithValueFunction... const eslintUtils.isNotColonToken as IsNotPunctuatorTokenWithValueFunction<':'> ✓
isCommaToken IsPunctuatorTokenWithValueFunction<Va... const eslintUtils.isCommaToken as IsPunctuatorTokenWithValueFunction<','> ✓
isNotCommaToken IsNotPunctuatorTokenWithValueFunction... const eslintUtils.isNotCommaToken as IsNotPunctuatorTokenWithValueFunction<','> ✓
isCommentToken IsSpecificTokenFunction<TSESTree.Comm... const eslintUtils.isCommentToken as IsSpecificTokenFunction<TSESTree.Comment> ✓
isNotCommentToken IsNotSpecificTokenFunction<TSESTree.C... const eslintUtils.isNotCommentToken as IsNotSpecificTokenFunction<TSESTree.Comment> ✓
isOpeningBraceToken IsPunctuatorTokenWithValueFunction<Va... const eslintUtils.isOpeningBraceToken as IsPunctuatorTokenWithValueFunction<'{'> ✓
isNotOpeningBraceToken IsNotPunctuatorTokenWithValueFunction... const eslintUtils.isNotOpeningBraceToken as IsNotPunctuatorTokenWithValueFunction<'{'> ✓
isOpeningBracketToken IsPunctuatorTokenWithValueFunction<Va... const eslintUtils.isOpeningBracketToken as IsPunctuatorTokenWithValueFunction<'['> ✓
isNotOpeningBracketToken IsNotPunctuatorTokenWithValueFunction... const eslintUtils.isNotOpeningBracketToken as IsNotPunctuatorTokenWithValueFunction... ✓
isOpeningParenToken IsPunctuatorTokenWithValueFunction<Va... const eslintUtils.isOpeningParenToken as IsPunctuatorTokenWithValueFunction<'('> ✓
isNotOpeningParenToken IsNotPunctuatorTokenWithValueFunction... const eslintUtils.isNotOpeningParenToken as IsNotPunctuatorTokenWithValueFunction<'('> ✓
isSemicolonToken IsPunctuatorTokenWithValueFunction<Va... const eslintUtils.isSemicolonToken as IsPunctuatorTokenWithValueFunction<';'> ✓
isNotSemicolonToken IsNotPunctuatorTokenWithValueFunction... const eslintUtils.isNotSemicolonToken as IsNotPunctuatorTokenWithValueFunction<';'> ✓

Type Aliases

IsSpecificTokenFunction<SpecificToken extends TSESTree.Token>

type IsSpecificTokenFunction<SpecificToken extends TSESTree.Token> = (
  token: TSESTree.Token,
) => token is SpecificToken;

IsNotSpecificTokenFunction<SpecificToken extends TSESTree.Token>

type IsNotSpecificTokenFunction<SpecificToken extends TSESTree.Token> = (
  token: TSESTree.Token,
) => token is Exclude<TSESTree.Token, SpecificToken>;

PunctuatorTokenWithValue<Value extends string>

type PunctuatorTokenWithValue<Value extends string> = {
  value: Value;
} & TSESTree.PunctuatorToken;

IsPunctuatorTokenWithValueFunction<Value extends string>

type IsPunctuatorTokenWithValueFunction<Value extends string> = IsSpecificTokenFunction<PunctuatorTokenWithValue<Value>>;

IsNotPunctuatorTokenWithValueFunction<Value extends string>

type IsNotPunctuatorTokenWithValueFunction<Value extends string> = IsNotSpecificTokenFunction<PunctuatorTokenWithValue<Value>>;

Generated by Syntax Scribe