Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

🐛 Allow arguments in d.ts files #3388

Closed
1 task done
MichaReiser opened this issue Oct 10, 2022 · 1 comment · Fixed by #3389
Closed
1 task done

🐛 Allow arguments in d.ts files #3388

MichaReiser opened this issue Oct 10, 2022 · 1 comment · Fixed by #3389
Assignees
Labels
A-Parser Area: parser L-TypeScript Area: TypeScript support in Rome S-Bug: confirmed Status: report has been confirmed as a valid bug
Milestone

Comments

@MichaReiser
Copy link
Contributor

Environment information

main (3263f956fcc27bedc1c7d60fa25473cc42f2abf7)

What happened?

  1. I tried to format a d.ts file that uses the identifier arguments.
  2. Formatting failed because of a syntax error

Expected result

TypeScript raises no syntax error for arguments inside of d.ts files play

I don't know if all d.ts files are parsed in loose mode or if this is an exception for arguments.

Code of Conduct

  • I agree to follow Rome's Code of Conduct
@MichaReiser MichaReiser added the S-Bug: confirmed Status: report has been confirmed as a valid bug label Oct 10, 2022
@MichaReiser MichaReiser self-assigned this Oct 10, 2022
@MichaReiser
Copy link
Contributor Author

MichaReiser commented Oct 10, 2022

It is an exception... nice, I guess

https://github.com/microsoft/TypeScript/blob/16156b1baf26a39ce428423f7106f3ef2b4e98bb/src/compiler/binder.ts#L3318-L3322

CC: @xunilrj

@MichaReiser MichaReiser linked a pull request Oct 11, 2022 that will close this issue
@ematipico ematipico added this to the 10.0.0 milestone Oct 11, 2022
@ematipico ematipico added L-TypeScript Area: TypeScript support in Rome A-Parser Area: parser labels Oct 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Parser Area: parser L-TypeScript Area: TypeScript support in Rome S-Bug: confirmed Status: report has been confirmed as a valid bug
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants