Options
All
  • Public
  • Public/Protected
  • All
Menu

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..."

Index

Functions

  • 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";
    see

    ImportElement#isFunctionOrObject

    Parameters

    Returns number

  • 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";
    see

    ImportElement#isFunctionOrObject

    see

    ImportElement#isType

    Parameters

    Returns number

Generated using TypeDoc