File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -891,21 +891,8 @@ export function transform(
891
891
parent . superClass = t . identifier ( `Object` )
892
892
} ,
893
893
VariableDeclaration ( { node : variableDeclaration } ) {
894
- if ( variableDeclaration . kind == `const` ) {
894
+ if ( variableDeclaration . kind == `const` )
895
895
variableDeclaration . kind = `let`
896
- variableDeclaration . extra = { ...variableDeclaration . extra , usedToBeConst : true }
897
- }
898
- } ,
899
- AssignmentExpression ( { node : assignment , scope } ) {
900
- const lhs = assignment . left
901
-
902
- if ( lhs . type != `Identifier` )
903
- return
904
-
905
- const binding = scope . getBinding ( lhs . name )
906
-
907
- if ( binding ?. path ?. parentPath ?. node ?. extra ?. usedToBeConst )
908
- throw new Error ( `Reassignment to const variable ${ lhs . name } is not allowed!` )
909
896
} ,
910
897
ThisExpression : path => {
911
898
path . replaceWith ( t . identifier ( `undefined` ) )
You can’t perform that action at this time.
0 commit comments