proposal-function-implementation-hiding icon indicating copy to clipboard operation
proposal-function-implementation-hiding copied to clipboard

Semantics of top-level directive

Open Huxpro opened this issue 4 years ago • 1 comments

What does top-level directives do?

'hide source';
function foo() { /* no hide source */ } // inherit?
function bar() { 'show source' } // override?

Would it be ignored? Would there be an error?

Huxpro avatar Feb 04 '21 23:02 Huxpro

From the current drafting spec it seems like

  1. top-level (script/module scope) directive is allowed
  2. stronger semantics always override weaker (i.e. inner scope can't override outer scope)

Am I understanding this correct?

Huxpro avatar Feb 05 '21 00:02 Huxpro