Rush StackShopBlogEvents
Skip to main content

Home > @microsoft/api-extractor-model > EnumMemberOrder

EnumMemberOrder enum

Options for customizing the sort order of ApiEnum members.

Signature:

export declare enum EnumMemberOrder 

Enumeration Members

MemberValueDescription
ByName"by-name"

ApiEnumMember items are sorted according to their ApiItem.getSortKey(). The order is basically alphabetical by identifier name, but otherwise unspecified to allow for cosmetic improvements.

This is the default behavior.

Preserve"preserve"ApiEnumMember items preserve the original order of the declarations in the source file. (This disables the automatic sorting that is normally applied based on ApiItem.getSortKey().)