Hierarchy

  • AsyncOptionalCreatable
    • AliasAccessor

Constructors

  • Constructs a new AsyncCreatable instance. For internal and subclass use only. New subclass instances must be created with the static create method.

    Parameters

    • Optional options: object

      An options object providing initialization params.

    Returns AliasAccessor

Methods

  • Returns the username that corresponds to the given alias if it exists

    Parameters

    • alias: string

      the alias that corresponds to a username

    Returns Nullable<string>

  • Returns the value that corresponds to the given alias if it exists

    Parameters

    • alias: string

      the alias that corresponds to a value

    Returns Nullable<string>

  • If the provided string is an alias, return it. If the provided string is not an alias, return the username of the provided alias

    This method is helpful when you don't know if the string you have is a username or an alias.

    Parameters

    • usernameOrAlias: string

      a string that might be a username or might be an alias

    Returns undefined | string

  • If the provided string is an alias, it returns the corresponding username. If the provided string is not an alias, we assume that the provided string is the username and return it.

    This method is helpful when you don't know if the string you have is a username or an alias.

    Parameters

    • usernameOrAlias: string

      a string that might be a username or might be an alias

    Returns string