Skip to content

Typscript parsing error in function type parrameter #573

Closed
@dragonofdeath

Description

When tsx enabled in .swcrc i get this syntax error for:

$ npx swc index.ts
error: TS1109
 --> index.ts:1:30
  |
1 | const fn = <T extends string | number>(x: T) => x;
  |                              ^

swc version

@swc/cli: 0.1.21 @swc/core: 1.1.11

Config file content:

{
  "jsc": {
    "parser": {
      "syntax": "typescript",
      "tsx": true,
      "decorators": false,
      "dynamicImport": false
    }
  }
}

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions