Skip to content

Commit

Permalink
Fix compiler issue with node 6 + latest TypeScript (#761)
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeembrey committed Jan 22, 2019
1 parent d9f310e commit 157bb4c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,13 @@ function startRepl () {
/**
* Eval code from the REPL.
*/
function replEval (code: string, _context: any, _filename: string, callback: (err?: Error, result?: any) => any) {
let err: Error | undefined
function replEval (code: string, _context: any, _filename: string, callback: (err: Error | null, result?: any) => any) {
let err: Error | null = null
let result: any

// TODO: Figure out how to handle completion here.
if (code === '.scope') {
callback()
callback(err)
return
}

Expand All @@ -297,7 +297,6 @@ function replEval (code: string, _context: any, _filename: string, callback: (er
err = new Recoverable(error)
} else {
console.error(error.diagnosticText)
err = undefined
}
} else {
err = error
Expand Down

0 comments on commit 157bb4c

Please sign in to comment.