NormalUser
일반 채팅방 유저
확장
생성자
new NormalUser(
id,
name,
profileImageUrl?,
memberType?,
customName?
): NormalUser;매개변수
| 매개변수 | 타입 | 기본값 |
|---|---|---|
id | string | undefined |
name | string | undefined |
profileImageUrl? | string | null | null |
memberType? | NormalMemberType | 'member' |
customName? | string | null | null |
반환값
NormalUser
오버라이드 대상:
속성
| 속성 | 수정자 | 타입 | 설명 | 상속받은 타입: |
|---|---|---|---|---|
customName | readonly | string | null | 친구 정보에서 내가 지정한 이름. 없으면 null | UserSelf.customName |
id | readonly | string | 유저 ID. 큰 정수라서 문자열로 다룹니다. | User.id |
memberType | readonly | NormalMemberType | 채팅방 멤버 종류 | - |
name | readonly | string | 유저 이름 | User.name |
profileImageUrl | readonly | string | null | 프로필 이미지 주소. 없으면 null | UserSelf.profileImageUrl |
profileType | readonly | "default" | 프로필 종류. 일반 채팅방은 항상 default | - |
접근자
raw
get 시그니쳐
get raw(): NormalUserRaw;유저 원본 데이터. 하위 클래스는 그 종류에 맞는 데이터를 돌려줍니다.
반환값
오버라이드 대상:
메서드
isBotUser()
isBotUser(): this is BotUser;채팅방에 추가된 챗봇 여부
반환값
this is BotUser
상속받은 타입:
isHost()
isHost(): boolean;방장 여부. 역할 정보가 없는 기본 User는 false
반환값
boolean
오버라이드 대상:
isMine()
isMine(): this is UserSelf;내 계정 여부
반환값
this is UserSelf
상속받은 타입:
isModerator()
isModerator(): boolean;부방장 여부. 역할 정보가 없는 기본 User는 false
반환값
boolean
오버라이드 대상:
isNormalUser()
isNormalUser(): this is NormalUser;일반 채팅방 유저(내 계정 포함) 여부
반환값
this is NormalUser
오버라이드 대상:
isOpenUser()
isOpenUser(): this is UserSelf | OpenUser;오픈채팅방 유저(내 계정 포함) 여부
반환값
this is UserSelf | OpenUser