Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throwing error makes all future code unreachable #469

Closed
crutchcorn opened this issue Nov 30, 2017 · 1 comment · Fixed by #1396
Closed

Throwing error makes all future code unreachable #469

crutchcorn opened this issue Nov 30, 2017 · 1 comment · Fixed by #1396
Labels
bug you can do this Good candidate for a pull request.
Milestone

Comments

@crutchcorn
Copy link

> throw new Error('Hi GH')
[eval].ts:2
throw new Error('Hi GH');
^

Error: Hi GH
    at [eval].ts:2:7
    at ContextifyScript.Script.runInContext (vm.js:59:29)
    at ContextifyScript.Script.runInNewContext (vm.js:65:15)
    at _eval (C:\Users\CorbinCrutchley\AppData\Roaming\npm\node_modules\ts-node\dist\_bin.js:181:29)
    at REPLServer.replEval (C:\Users\CorbinCrutchley\AppData\Roaming\npm\node_modules\ts-node\dist\_bin.js:220:18)
    at bound (domain.js:301:14)
    at REPLServer.runBound [as eval] (domain.js:314:12)
    at REPLServer.onLine (repl.js:441:10)
    at emitOne (events.js:116:13)
    at REPLServer.emit (events.js:211:7)
> let a = 5
Thrown: ⨯ Unable to compile TypeScript
[eval].ts (1,1): Unreachable code detected. (7027)

This behavior is not present in the node REPL.

@blakeembrey
Copy link
Member

This is an unfortunate issue and I can’t see any way to fix it unless we can disable the unreachable code error. I’ll have to look into that but feel free to submit a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug you can do this Good candidate for a pull request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants