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

Typscript parsing error in function type parrameter #573

Closed
dragonofdeath opened this issue Jan 7, 2020 · 2 comments
Closed

Typscript parsing error in function type parrameter #573

dragonofdeath opened this issue Jan 7, 2020 · 2 comments
Assignees
Milestone

Comments

@dragonofdeath
Copy link

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
    }
  }
}
@kdy1 kdy1 self-assigned this Jan 7, 2020
@kdy1 kdy1 added this to the v1.1.12 milestone Jan 7, 2020
kdy1 added a commit to kdy1/swc that referenced this issue Jan 7, 2020
@kdy1
Copy link
Member

kdy1 commented Jan 7, 2020

The parser is crazy. It parses the code correctly if a reference file does not exist but it fails if not. Investigating it...

It was a problem of a test suite.

kdy1 added a commit to kdy1/swc that referenced this issue Jan 7, 2020
@bors bors bot closed this as completed in 6eb0661 Jan 7, 2020
@swc-bot
Copy link
Collaborator

swc-bot commented Oct 28, 2022

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@swc-project swc-project locked as resolved and limited conversation to collaborators Oct 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants