Skip to content
This repository was archived by the owner on Apr 16, 2026. It is now read-only.
This repository was archived by the owner on Apr 16, 2026. It is now read-only.

[TypeScript] for in highlighted as type #5909

Closed

Description

@ficristo
export function getShell() {
    const config = shell[brackets.platform];
    const params: PlatformConfig = {};
    for (const key in config) {
        if (config.hasOwnProperty(key)) {
            params[key] = prefs.get(config[key]);
        }
    }
    return params;
}

config inside the for is highlighted as type when it shouldn't.

Activity

  1. ficristo commented on Jun 18, 2019

    @ficristo
    ContributorAuthor

    The first issue mentioned here #5737 is not highlighted correctly anymore.
    The keyof JSX.IntrinsicElements after in aren't highlighted as keyword and type.

  2. marijnh commented on Jun 19, 2019

    @marijnh
    Member

    Ah, thanks for referencing that, that explains the original code.

  3. ficristo commented on Jun 19, 2019

    @ficristo
    ContributorAuthor

    I copied and pasted the snipped on the site https://codemirror.net/mode/javascript/typescript.html and doesn't seem to be correct. Do I need to wait?

    type ReactType<P = any> =
            {
                [K in keyof JSX.IntrinsicElements]: P extends JSX.IntrinsicElements[K] ? K : never
            }[keyof JSX.IntrinsicElements] |
            ComponentType<P>;
  4. marijnh commented on Jun 20, 2019

    @marijnh
    Member

    What's wrong? I'm seeing JSX.IntrinsicElement highlighted as a type.

  5. ficristo commented on Jun 20, 2019

    @ficristo
    ContributorAuthor

    I mean the [K in keyof JSX.IntrinsicElements] part.

  6. marijnh commented on Jun 21, 2019

    @marijnh
    Member

    Ah, sorry, it seems I was looking at an old cached version of the script. Try again with 9353e16

  7. ficristo commented on Jun 21, 2019

    @ficristo
    ContributorAuthor

    Thank you!

  8. added 3 commits that reference this issue on Jan 6, 2020
    750c7fe
    c4d8d5d
    0b5918a
  9. added a commit that references this issue on Jan 21, 2020
    2e3f6d4
  10. added a commit that references this issue on Sep 5, 2024
    306c38e
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions