Class Profile

Represents a user profile that exists on the system.

Hierarchy

  • Profile

Constructors

Properties

Accessors

Methods

Constructors

  • Creates a new Profile instance from the given profile UID.

    Parameters

    Returns Profile

    Example

    const profile = new Switch.Profile([
    0x10005d4864d166b7n,
    0x965b8cb028cd8a81n,
    ]);
    console.log(profile.nickname);

Properties

The raw JPEG data for the profile image. Can be decoded with the Image class.

nickname: string

The human readable nickname of the profile.

The unique ID of the profile, represented as an array of two bigint values.

Accessors

  • get current(): null | Profile
  • Returns null | Profile

  • set current(v): void
  • Parameters

    Returns void

Methods

  • Can be used as an iterator to retrieve the list of user profiles.

    Returns Generator<Profile, void, unknown>

    Example

    for (const profile of Switch.Profile) {
    console.log(profile.nickname);
    }
  • Shows the user selection interface and returns a Profile instance representing the user that was selected.

    Returns null | Profile

    Note

    This function blocks the event loop until the user has made their selection.

Generated using TypeDoc