Add descriptions to transformation/transformers/es6/constants
This commit is contained in:
parent
90a5b96480
commit
3207a387a7
@ -1,13 +1,29 @@
|
||||
import * as messages from "../../../messages";
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
* Turn constants into variables.
|
||||
* Ensure there are no constant violations in any scope.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* **In**
|
||||
*
|
||||
* ```javascript
|
||||
* const MULTIPLIER = 5;
|
||||
* ```
|
||||
*
|
||||
* **Out**
|
||||
*
|
||||
* ```javascript
|
||||
* var MULTIPLIER = 5;
|
||||
* ```
|
||||
*/
|
||||
|
||||
export var visitor = {
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
* Look for any constants (or modules) in scope.
|
||||
* If they have any `constantViolations` throw an error.
|
||||
*/
|
||||
|
||||
Scope(node, parent, scope) {
|
||||
@ -24,7 +40,8 @@ export var visitor = {
|
||||
},
|
||||
|
||||
/**
|
||||
* [Please add a description.]
|
||||
* Look for constants.
|
||||
* Turn them into `let` variables.
|
||||
*/
|
||||
|
||||
VariableDeclaration(node) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user