Compares two import elements based on their names split apart on capital letters. Then this runs the sub words in reverse order to check for likeness. If all sub words are the same but one is longer this will be recognized as equal.
This ignores every element that is not a type.
Example:
// unsorted
import {StartBase, Stuff, OtherBase, PowStuff} from "stuff";
// sorted
import {StartBase, OtherBase, Stuff, PowStuff} from "stuff";
Compares two import element names by their name alphabetically.
Example:
// unsorted
import {c, d, e, a} from "alphabet";
// sorted
import {a, b, c, d} from "alphabet";
Compares two import elements whether they are a function, object or Type. If both elements are the same the will recognized as equal.
Example:
// unsorted
import {a, B, C, d} from "alphabet";
// sorted
import {a, d, B, C} from "alphabet";
Generated using TypeDoc
These are all the comparator functions for comparing two ImportElements with each other. They all implement ImportElementCompareFunction.
You can read the filenames as "sort import elements (increasingly) by..."