Function: isGlobalIdentifierNamed()
function isGlobalIdentifierNamed<MessageIds, Options>(
context: Readonly<TSESLint.RuleContext<MessageIds, Options>>,
expression: Readonly<Expression>,
identifierName: string
): expression is Identifier;
Defined in: _internal/typed-rule.ts:275
Determine whether an expression references an unshadowed global identifier.
Type Parametersโ
MessageIdsโ
MessageIds extends string
Optionsโ
Options extends readonly unknown[]
Parametersโ
contextโ
Readonly<TSESLint.RuleContext<MessageIds, Options>>
Rule context used for scope resolution.
expressionโ
Readonly<Expression>
Expression to inspect.
identifierNameโ
string
Expected identifier name.
Returnsโ
expression is Identifier
true when the expression is an Identifier with the expected name
and resolves to the global binding.