Skip to content

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

Open

Description

@codebytere

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()'>;

Activity

  1. MarshallOfSound commented on Sep 23, 2024

    @MarshallOfSound
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    🪲 bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions