You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
curiosity:test gajus$ echo'let test;'| node --use_strong
node.js:14
var EventEmitter = NativeModule.require('events');
^^^
SyntaxError: In strong mode, 'var' is deprecated, use 'let' or 'const' instead
Given that node supports let in strict mode, this should be already possible.
The text was updated successfully, but these errors were encountered:
Node.js does not support running under an enforced strong mode, that's a v8 flag.
Also, you should not be enforcing strict/strong and whatever else modes with global flags. Use use strict or use strong per file or function instead, or else you are going to terribly break various modules expectations.
I'm fairly sure we can't support --use_strong even if we wanted to. Some of the restrictions are highly incompatible with the current code base and would probably trick down into user code.
@gajus Consider using --strong_mode and 'use strong' to opt-in to strong mode on a per-function / per-module basis.
Given that node supports
let
in strict mode, this should be already possible.The text was updated successfully, but these errors were encountered: