Skip to content

@swc/wasm-typescript error snippet not working #10188

@marco-ippolito

Description

@marco-ippolito

Refs: https://github.com/nodejs/amaro/pull/202/files

for example the syntax const foo;.
throws this error:

{
  "code": "InvalidSyntax",
  "message": "'const' declarations must be initialized",
  "snippet": "foo",
  "filename": "<anon>",
  "line": 1,
  "column": 6
}

Note that snippet foo does not give enough info.
The snippet should be:

const foo; and have startColumn and endColumn so we can mark the syntax thats incorrect, or
directly something like:

const foo;
      ^^^

I know you are already aware of it, creating this issue to track.
Thanks for your work <3

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions