Uses of Interface
com.google.javascript.jscomp.NodeTraversal.Callback
Packages that use NodeTraversal.Callback
Package
Description
-
Uses of NodeTraversal.Callback in com.google.javascript.jscomp
Subinterfaces of NodeTraversal.Callback in com.google.javascript.jscompModifier and TypeInterfaceDescriptionstatic interfaceCallback that also knows about scope changesClasses in com.google.javascript.jscomp that implement NodeTraversal.CallbackModifier and TypeClassDescriptionfinal classProvides a framework for checking code against a set of user configured conformance rules.classA pass to detect references to fully qualified Closure namespaces.final classChecks for invalid code references to type-only imports (i.e., goog.requireType).classCompiler pass for Chrome-specific needs.final classChecks that goog.module() is used correctly.final classThis class computes aControlFlowGraphfor a given ASTstatic classAbstract callback to visit a control flow graph node without going into subtrees of the node that are also represented by other control flow graph nodes.final classCollects global variable references for use byCrossChunkCodeMotion.final classChecks that ES6 Modules are used correctly, and do not reference undefined keywords or features.final classConvertssuper.method()calls and adds constructors to any classes that lack them.final classConvertssuper()calls.final classExtracts ES6 classes defined in function calls to local constants.final classConverts ES6 "for of" loops to ES5.final classRenames variables declared in function bodies so they don't shadow any variable referenced in the param list.classConverts ES6 arrow functions to standard anonymous ES3 functions.final classRewrite "let"s and "const"s as "var"s.final classRewrite block-scoped function declarations as "let"s.final classConverts ES6 classes to valid ES5 or ES3 code.final classExtracts ES6 class extends expressions and creates an alias.final classRewrites destructuring patterns and default parameters to valid ES3 code or to a different form of destructuring.final classRewrites a ES6 module into a form that can be safely concatenated.final classConverts REST parameters and SPREAD expressions.final classRewrites a script which was imported as a module into an ES6 module.final classSplits variable declarations that declare multiple variables into separate declarations, if at least one of the declarations is a destructuring declaration.final classReplaces the ES7 `**` and `**=` operators to calls to `Math.pow`.final classWalks the AST looking for usages of qualified names, and 'goog.require's of those names.classFind and update any direct dependencies of an input.classWarns at any usage of Dynamic Import expressions that they are unable to be transpiled.final classWarn about types in JSDoc that are implicitly nullable.final classInjects JS library code that may be needed by the transpiled form of the input source code.classInstrumentsawaitandyieldfor theAsyncContextpolyfill.classAn optimization pass to remove J2CL Asserts.$assert.classPerforms correctness checks which are specific to J2CL-generated patterns.classA normalization pass to re-write Util.$getDefine calls to make them work in compiled mode.classLocates JS code that is intended to declare localizable messages.final classConverts ES6 code to valid ES5 code.static classAn traversal base class that tracks and caches the ControlFlowGraph (CFG) during the traversal.static classCallback that fires on changed scopes.static classAbstract callback that knows when a global script, goog.provide file, goog.module, goog.loadModule, ES module or CommonJS module is entered or exited.static classAbstract callback to visit all nodes in postorder.static classAbstract callback to visit all nodes in preorder.static classAbstract scoped callback to visit all nodes in postorder.static classAbstract callback to visit all nodes but not traverse into function bodies.static classAbstract callback to visit all structure and statement nodes but doesn't traverse into functions or expressions.static classAbstract callback to visit all non-extern nodes in postorder.final classRewrites a CommonJS module http://wiki.commonjs.org/wiki/Modules/1.1.1 into a form that can be safely concatenated.final classConverts async functions to valid ES6 generator functions code.final classConverts async generator functions into a function returning a new $jscomp.AsyncGenWrapper around the original block and awaits/yields converted to yields of ActionRecords.final classReplaces the ES2022 class fields and class static blocks with constructor declaration.classRewrite dynamic import expressions to account for bundling and module rewriting.classRewrites a JSON file to be a module export.final classReplaces the ES2020 `||=`, `invalid input: '&'invalid input: '&'=`, and `??=` operators.final classReplaces the ES2020 `??` operator with conditional (?:).final classConverts object spread to valid ES2017 code.final classAnnotates nodes with information from their original input file before the compiler performs work that changes this information (such as its original location, its original name, etc).final classChecks the types of JS expressions against any declared type information.Methods in com.google.javascript.jscomp with parameters of type NodeTraversal.CallbackModifier and TypeMethodDescriptionNodeTraversal.Builder.setCallback(NodeTraversal.Callback x) static voidNodeTraversal.traverse(AbstractCompiler compiler, Node root, NodeTraversal.Callback cb) Traverses using the SyntacticScopeCreatorstatic voidNodeTraversal.traverseRoots(AbstractCompiler compiler, NodeTraversal.Callback cb, Node externs, Node root) static voidNodeTraversal.traverseScopeRoots(AbstractCompiler compiler, @Nullable Node root, @Nullable List<Node> scopeNodes, NodeTraversal.Callback cb, boolean traverseNested) Traverses *just* the contents of provided scope nodes (and optionally scopes nested within them) but will fall back on traversing the entire AST from root if a null scope nodes list is provided. -
Uses of NodeTraversal.Callback in com.google.javascript.jscomp.instrumentation
Classes in com.google.javascript.jscomp.instrumentation that implement NodeTraversal.CallbackModifier and TypeClassDescriptionclassInstrument branch coverage for javascript. -
Uses of NodeTraversal.Callback in com.google.javascript.jscomp.lint
Classes in com.google.javascript.jscomp.lint that implement NodeTraversal.CallbackModifier and TypeClassDescriptionfinal classLints against passing arrays to goog.object methods with the intention of iterating over them as though with a for-in loop, which is discouraged with arrays.classThis pass looks for module-level variable declarations that use CONSTANT_CASE, according to the Google style guide, and verifies that they are also annotated @const or are in a const clause.classThis pass looks for properties that are not modified and ensures they use the @const annotation.final classCheck for duplicate case labels in a switch statement Eg: switch (foo) { case 1: case 1: }final classCheck for empty statements (i.e.final classChecks the following: Whether there are duplicate values in enums.final classChecks the file structure of ES6 modules.final classMiscellaneous checks for style in ES6 modules.classWalks the AST looking for usages of qualified names, and 'goog.require's of those names.final classChecks that goog.module statement matches the generated TypeScript module namespace, which is based on the file path.final classChecks for errors related to interfaces.final classChecks for various JSDoc-related style issues, such as function definitions without JsDoc, params with no corresponding@paramannotation, coding conventions not being respected, etc.final classCheck for statements that should end with a semicolon according to the Google style guide.final classChecks if code has a module-level static property assignment (`X.Y`) inside a `goog.module`.final classChecks that exports of ES6 modules are not mutated outside of module initialization.classChecks for missing or redundant nullability modifiers.final classCheck for explicit creation of the object equivalents of primitive types (e.g.final classChecks when a mutable property is assigned to a prototype.final classChecks that goog.provide statements are sorted and deduplicated, exposing the necessary information to produce a suggested fix.final classChecks that Closure import statements (goog.require, goog.requireType, and goog.forwardDeclare) are sorted and deduplicated, exposing the necessary information to produce a suggested fix.final classCheck for unused labels blocks.classThis pass looks for properties that are never read.final classCheck for useless blocks.final classCheck for `var` (prefer `const` or `let`). -
Uses of NodeTraversal.Callback in com.google.javascript.jscomp.modules
Classes in com.google.javascript.jscomp.modules that implement NodeTraversal.CallbackModifier and TypeClassDescriptionfinal classCollects information related to and resolves ES imports and exports.