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(
891891 parent . superClass = t . identifier ( `Object` )
892892 } ,
893893 VariableDeclaration ( { node : variableDeclaration } ) {
894- if ( variableDeclaration . kind == `const` ) {
894+ if ( variableDeclaration . kind == `const` )
895895 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!` )
909896 } ,
910897 ThisExpression : path => {
911898 path . replaceWith ( t . identifier ( `undefined` ) )
You can’t perform that action at this time.
0 commit comments