Skip to content

Commit f82a08d

Browse files
authored
Merge branch 'master' into master
2 parents f52fbc6 + c80b5f2 commit f82a08d

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

packages/experimental-utils/src/ast-utils/predicates.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
11
import { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree } from '../ts-estree';
22

33
function isOptionalChainPunctuator(
4-
token: TSESTree.Token | TSESTree.Comment,
4+
token: TSESTree.Token,
55
): token is TSESTree.PunctuatorToken & { value: '?.' } {
66
return token.type === AST_TOKEN_TYPES.Punctuator && token.value === '?.';
77
}
8-
function isNotOptionalChainPunctuator(
9-
token: TSESTree.Token | TSESTree.Comment,
10-
): boolean {
8+
function isNotOptionalChainPunctuator(token: TSESTree.Token): boolean {
119
return !isOptionalChainPunctuator(token);
1210
}
1311

1412
function isNonNullAssertionPunctuator(
15-
token: TSESTree.Token | TSESTree.Comment,
13+
token: TSESTree.Token,
1614
): token is TSESTree.PunctuatorToken & { value: '!' } {
1715
return token.type === AST_TOKEN_TYPES.Punctuator && token.value === '!';
1816
}
19-
function isNotNonNullAssertionPunctuator(
20-
token: TSESTree.Token | TSESTree.Comment,
21-
): boolean {
17+
function isNotNonNullAssertionPunctuator(token: TSESTree.Token): boolean {
2218
return !isNonNullAssertionPunctuator(token);
2319
}
2420

@@ -209,7 +205,7 @@ function isAwaitExpression(
209205
* Checks if a possible token is the `await` keyword.
210206
*/
211207
function isAwaitKeyword(
212-
node: TSESTree.Token | TSESTree.Comment | undefined | null,
208+
node: TSESTree.Token | undefined | null,
213209
): node is TSESTree.KeywordToken & { value: 'await' } {
214210
return node?.type === AST_TOKEN_TYPES.Identifier && node.value === 'await';
215211
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy