Skip to content

Is there any reason to sort named member symbols in structured type properties? #759

Open
@auvred

Description

@auvred

I noticed that getNamedMembers -> sortSymbols takes 2.5-3% of total tsgo --noEmit execution time.

Image

I wonder if there any particular reason to sort members here? For type-checking purposes it doesn't matter whether properties are sorted or not.

Without this sorting, some tests obviously fail because they rely on error messages where the order of properties matters. So maybe property sorting should only be done when formatting error messages/suggestions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions