Hi, thanks for working on a previous issue #6747. I found another case that you may want to have a look at.
Again, I know the code being submitted to the compiler is invalid; however, I want Deno to tell me that instead of panicing.
Thanks!
Deno version:
deno 1.2.1
v8 8.5.216
typescript 3.9.2
Example code:
Deno.compile("main.js", { "main.js": `
export class Foo {
constructor() {
console.log("foo");
}
export get() {
console.log("bar");
}
}
`});
Attempted compile with:
$ deno run --unstable foo.js
thread 'main' panicked at 'Can't downcast ErrBox(SwcDiagnosticBuffer { diagnostics: ["Unexpected token Some(Word(get)) at memory://main.js:6:9"] }) to OpError', cli/op_error.rs:423:9
Also, if you have a recommendation for a third party module that might be able to pre-parse code to filter out cases like these I'd be happy to hear about it.
@sdhoward thanks for reporting that, it should be an easy fix, I'll try to get it released in v1.2.2 in the next days.
Most helpful comment
@sdhoward thanks for reporting that, it should be an easy fix, I'll try to get it released in
v1.2.2in the next days.