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

Bullet lists incorrectly take precedence over explicit Returns <type> #84

Open
codebytere opened this issue Apr 4, 2023 · 1 comment
Labels
🪲 bug Something isn't working

Comments

@codebytere
Copy link
Member

codebytere commented Apr 4, 2023

See electron/electron#37781 - this lead to a wildly incorrect return type of:

getPreferredSystemLanguages(): Array<'app.getLocale()' | 'app.getSystemLocale()' | 'app.getPreferredSystemLanguages()' | 'app.getLocale()' | 'app.getSystemLocale()' | 'app.getPreferredSystemLanguages()'>;
@MarshallOfSound
Copy link
Member

I looked into this this week and honestly this is a tricky one, the list isn't taking precedence, rather augmenting the String type.

The logic is basically "is it a string, if so is there a list, if so make an enum from that list" which is hard to be like "unless it's not an enum list" when we clearly can't detect them very well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants