4 ms·
It doesn't overwrite the function on the global scope, but it does shadow the `clearInterval` name within the function definition, which I don't believe it shou
by agency 10y ago
It doesn't overwrite the function on the global scope, but it does shadow the `clearInterval` name within the function definition, which I don't believe it should do according to the ES6 spec. Compare:
https://buble.surge.sh/#class%20A%20%7B%0A%20%20clearInterval()%20%7B%0A%20%20%20%20console.log(this.clearInterval%20%3D%3D%3D%20clearInterval)%0A%20%20%7D%0A%7D%0A%0Anew%20A().clearInterval() https://buble.surge.sh/#class%20A%20%7B%0A%20%20clearInterva...
with
https://babeljs.io/repl/#?babili=false&evaluate=true&lineWrap=false&presets=es2015%2Creact%2Cstage-2&experimental=true&loose=false&spec=false&code=class%20A%20%7B%0A%20%20clearInterval()%20%7B%0A%20%20%20%20console.log(this.clearInterval%20%3D%3D%3D%20clearInterval)%0A%20%20%7D%0A%7D%0A%0Anew%20A().clearInterval() https://babeljs.io/repl/#?babili=false&evaluate=true&lineWra...