t2ym / thin-hook

Thin Hook Preprocessor
Other
4 stars 1 forks source link

[v8 engine] Functions with newline after return statement returns undefined #257

Open t2ym opened 6 years ago

t2ym commented 6 years ago

[v8 engine] Arrow functions with newline after return statement returns undefined

Root Cause

Reproducible Code Examples

(() => { return
1 })() // returns undefined
(function () { return
1})() // returns undefined

Side Effects in hooking

Workaround

t2ym commented 6 years ago

Root Cause

Notes

Referenced Issue

https://github.com/Microsoft/TypeScript/issues/2704