CodeQL library for JavaScript
Search

Module Aliases

Provides aliases for commonly used classes that have different names in the QL libraries for other languages.

Import path

import semmle.javascript.Aliases

Imports

javascript

Provides classes for working with JavaScript programs, as well as JSON, YAML and HTML.

Predicates

arraySize

Alias for the predicate array_size defined in the .dbscheme. Use ArrayExpr#getSize() instead.

charClassEscape

Alias for the predicate char_class_escape defined in the .dbscheme. Use RegExpCharacterClassEscape#getValue() instead.

enclosingStmt

Alias for the predicate enclosing_stmt defined in the .dbscheme. Use ExprOrType#getEnclosingStmt instead.

exprContainers

Alias for the predicate expr_containers defined in the .dbscheme. Use ASTNode#getContainer() instead.

hasAssertsKeyword

Alias for the predicate has_asserts_keyword defined in the .dbscheme. Use `PredicateTypeExpr#hasAssertsKeyword() instead.

hasDeclareKeyword

Alias for the predicate has_declare_keyword defined in the .dbscheme.

hasDefiniteAssignmentAssertion

Alias for the predicate has_definite_assignment_assertion defined in the .dbscheme. Use the hasDefiniteAssignmentAssertion method on the FieldDeclaration/VariableDeclarator classes instead.

hasPrivateKeyword

Alias for the predicate has_private_keyword defined in the .dbscheme. Use `MemberDeclaration#isPrivate() instead.

hasProtectedKeyword

Alias for the predicate has_protected_keyword defined in the .dbscheme. Use `MemberDeclaration#isProtected() instead.

hasPublicKeyword

Alias for the predicate has_public_keyword defined in the .dbscheme. Use `MemberDeclaration#hasPublicKeyword() instead.

hasReadonlyKeyword

Alias for the predicate has_readonly_keyword defined in the .dbscheme. Use FieldDeclaration#isReadonly() instead.

hasRestParameter

Alias for the predicate has_rest_parameter defined in the .dbscheme. Use Function#hasRestParameter() instead.

hasTypeKeyword

Alias for the predicate has_type_keyword defined in the .dbscheme. Use the isTypeOnly method on the ImportDeclaration/ExportDeclaration classes instead.

isAbstractClass

Alias for the predicate is_abstract_class defined in the .dbscheme. Use ClassDefinition#isAbstract() instead.

isAbstractMember

Alias for the predicate is_abstract_member defined in the .dbscheme. Use MemberDeclaration#isAbstract() instead.

isArgumentsObject

Alias for the predicate is_arguments_object defined in the .dbscheme. Use the ArgumentsVariable class instead.

isAsync

Alias for the predicate is_async defined in the .dbscheme. Use Function#isAsync() instead.

isCapture

Alias for the predicate is_capture defined in the .dbscheme. Use RegExpGroup#isCapture() instead.

isClosureModule

Alias for the predicate is_closure_module defined in the .dbscheme.

isComputed

Alias for the predicate is_computed defined in the .dbscheme. Use the isComputed() method on the MemberDeclaration/Property/PropertyPattern class instead.

isConstEnum

Alias for the predicate is_const_enum defined in the .dbscheme. Use EnumDeclaration#isConst() instead.

isDelegating

Alias for the predicate is_delegating defined in the .dbscheme. Use YieldExpr#isDelegating() instead.

isES2015Module

Alias for the predicate is_es2015_module defined in the .dbscheme. Use ES2015Module from ES2015Modules.qll instead.

isExterns

Alias for the predicate is_externs defined in the .dbscheme. Use TopLevel#isExterns() instead.

isForAwaitOf

Alias for the predicate is_for_await_of defined in the .dbscheme. Use ForOfStmt#isAwait() instead.

isGenerator

Alias for the predicate is_generator defined in the .dbscheme. Use Function#isGenerator() instead.

isGreedy

Alias for the predicate is_greedy defined in the .dbscheme. Use RegExpQuantifier#isGreedy instead.

isInstantiated

Alias for the predicate is_instantiated defined in the .dbscheme. Use NamespaceDeclaration#isInstantiated() instead.

isInverted

Alias for the predicate is_inverted defined in the .dbscheme. Use RegExpCharacterClass#isInverted() instead.

isMethod

Alias for the predicate is_method defined in the .dbscheme. Use the isMethod() method on the MemberDeclaration/Property class instead.

isModule

Alias for the predicate is_module defined in the .dbscheme. Use the Module class in Module.qll instead.

isNamedCapture

Alias for the predicate is_named_capture defined in the .dbscheme. Use RegExpGroup#isNamed() instead.

isNodejs

Alias for the predicate is_nodejs defined in the .dbscheme. Use NodeModule from NodeJS.qll instead.

isOptionalMember

Alias for the predicate is_optional_member defined in the .dbscheme. Use FieldDeclaration#isOptional() instead.

isOptionalParameterDeclaration

Alias for the predicate is_optional_parameter_declaration defined in the .dbscheme. Use Parameter#isDeclaredOptional() instead.

isStatic

Alias for the predicate is_static defined in the .dbscheme. Use MemberDeclaration#isStatic() instead.

jsParseErrors

Alias for the predicate js_parse_errors defined in the .dbscheme. Use the JSParseError class instead.

jumpTargets

Alias for the predicate jump_targets defined in the .dbscheme. Use JumpStmt#getTarget() instead.

namedBackref

Alias for the predicate named_backref defined in the .dbscheme. Use RegExpBackRef#getName() instead.

rangeQuantifierLowerBound

Alias for the predicate range_quantifier_lower_bound defined in the .dbscheme. Use RegExpRange#getLowerBound() instead.

rangeQuantifierUpperBound

Alias for the predicate range_quantifier_upper_bound defined in the .dbscheme. Use `RegExpRange#getUpperBound() instead.

regexpConstValue

Alias for the predicate regexp_const_value defined in the .dbscheme. Use RegExpConstant#getValue() instead.

regexpParseErrors

Alias for the predicate regexp_parse_errors defined in the .dbscheme. Use the RegExpParseError class instead.

stmtContainers

Alias for the predicate stmt_containers defined in the .dbscheme. Use ASTNode#getContainer() instead.

unicodePropertyEscapeName

Alias for the predicate unicode_property_escapename defined in the .dbscheme. Use RegExpUnicodePropertyEscape#getName() instead.

unicodePropertyEscapeValue

Alias for the predicate unicode_property_escapevalue defined in the .dbscheme. Use RegExpUnicodePropertyEscape#getValue() instead.

Aliases

AndBitwiseExpr

A bitwise ‘and’ expression.

AndLogicalExpr

A logical ‘and’ expression.

ArrayAccess

An index expression (also known as computed property access).

AssignOp

A compound assign expression.

Block

DEPRECATED: The name BlockStmt is now preferred in all languages.

BoolLiteral

A Boolean literal, that is, either true or false.

CaseStmt

A case or default clause in a switch statement.

ComparisonOperation

A comparison expression, that is, either an equality test (==, !=, ===, !==) or a relational expression (<, <=, >=, >).

DoStmt

A do-while loop.

EqualityOperation

An equality test using ==, !=, === or !==.

FieldAccess

A dot expression.

InstanceOfExpr

An instanceof expression.

LabelStmt

A labeled statement.

LogicalAndExpr

A logical ‘and’ expression.

LogicalNotExpr

A logical negation expression.

LogicalOrExpr

A logical ‘or’ expression.

Loop

A loop, that is, is a while loop, a do-while loop, a for loop, or a for-in loop.

MultilineComment

A block comment (which may be a JSDoc comment).

OrBitwiseExpr

A bitwise ‘or’ expression.

OrLogicalExpr

A logical ‘or’ expression.

ParenthesisExpr

A parenthesized expression.

ParenthesizedExpr

A parenthesized expression.

RelationalOperation

A relational comparison using <, <=, >=, or >.

RemExpr

A modulo expression.

SingleLineComment

A line comment, that is, either an HTML comment or a // comment.

SuperAccess

A super expression.

SwitchCase

A case or default clause in a switch statement.

ThisAccess

A this expression.

VariableAccess

An identifier that refers to a variable in a non-declaring position.

XorBitwiseExpr

An exclusive ‘or’ expression.