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

Throw on empty params/args list in typescript #9968

Closed
wants to merge 1 commit into from
Closed

Throw on empty params/args list in typescript #9968

wants to merge 1 commit into from

Conversation

danez
Copy link
Member

@danez danez commented May 11, 2019

Q                       A
Fixed Issues? Fixes #9462
Patch: Bug Fix? y
Major: Breaking Change? n
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

I'm not sure about the error codes. I need to add error codes to the message, so that I can allow them to throw in tsTryAndCatch. I didn't want to inline the codes as strings, so I went for a file containing the code and the message. It would be nice to have something like TS const enums so they could be inlined in the published code, but we do not have that. Open for suggestions.

@danez danez added PR: Bug Fix 🐛 A type of pull request used for our changelog categories pkg: parser area: typescript labels May 11, 2019
@babel-bot
Copy link
Collaborator

babel-bot commented May 11, 2019

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/10777/


export default {
TS_ERR_0001: {
code: "TS_ERR_0001",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer this to be a Symbol(), to prevent people from relying on them. We should discuss if we want to give every error a public code, or to keep it internal.

@sosukesuzuki
Copy link
Member

What is the status? Can I work on this?

@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Dec 23, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: typescript outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser PR: Bug Fix 🐛 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeScript: missing error on empty typeArguments and typeParameters
4 participants