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

Support negative numeric literals #8

Closed
valtterikodisto opened this issue Aug 12, 2022 · 1 comment
Closed

Support negative numeric literals #8

valtterikodisto opened this issue Aug 12, 2022 · 1 comment
Labels

Comments

@valtterikodisto
Copy link

Repro

Running

convertTypeScriptToCoreTypes("export type Num = 1000 | -1")

produces the following ouput:

{
  "data": {
    "version": 1,
    "types": [
      {
        "name": "Num",
        "title": "Num",
        "type": "or",
        "or": [
          {
            "type": "number",
            "const": 1000,
            "title": "Num"
          }
        ]
      }
    ]
  },
  "convertedTypes": [
    "Num"
  ],
  "notConvertedTypes": []
}

when the correct output should be:

{
  "data": {
    "version": 1,
    "types": [
      {
        "name": "Num",
        "title": "Num",
        "type": "or",
        "or": [
          {
            "type": "number",
            "const": 1000,
            "title": "Num"
          },
          {
            "type": "number",
            "const": -1,
            "title": "Num"
          }
        ]
      }
    ]
  },
  "convertedTypes": [
    "Num"
  ],
  "notConvertedTypes": []
}
@github-actions
Copy link

github-actions bot commented Feb 3, 2023

🎉 This issue has been resolved in version 3.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant