question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Doesn't work with ES6 consts

See original GitHub issue

You get errors like this:

TypeError: Assignment to constant variable.
  at eval (eval at __set__ (my-module.js:73:19), <anonymous>:1:21)
  at Object.__set__ (my-module.js:73:5)
  at Context.<anonymous> (my-module-test.js:131:55)

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:10
  • Comments:28 (7 by maintainers)

github_iconTop GitHub Comments

19reactions
kaktus42commented, May 18, 2016

I can’t reproduce this issue. I can rewire const functions.

18reactions
daithi-coombescommented, Jun 29, 2016

+1 for allowing rewire of const’s

Read more comments on GitHub >

github_iconTop Results From Across the Web

Proper use of const for defining functions - Stack Overflow
In the case of const , block scoping means a narrower scope than function scoping, TDZ means that we don't need to scan...
Read more >
const - JavaScript - MDN Web Docs - Mozilla
The const declaration creates block-scoped constants, much like variables declared using the let keyword. The value of a constant can't be ...
Read more >
JavaScript ES6+: var, let, or const? | by Eric Elliott - Medium
`const` is a signal that the identifier won't be reassigned. `let` is a signal that the variable may be reassigned, such as a...
Read more >
"const" does not work as expected in JS policy
the JS policy does not support ES6. It's EcmaScript 1.7. No let, const. No typed arrays. No spread / rest operators. No arrow...
Read more >
JavaScript const: Declaring Constants in ES6
Introduction to the JavaScript const keyword ... ES6 provides a new way of declaring a constant by using the const keyword. The const...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found