Skip to content

Commit

Permalink
Merge pull request #104 from tada-team/meeting-freq-statuses
Browse files Browse the repository at this point in the history
update ts manual classes
  • Loading branch information
melkayalenka authored May 24, 2022
2 parents 3f3630c + 653cc9f commit 471abe8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion codegen/typescript/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,35 +265,40 @@ export interface TeamUnreadJSON {
direct: UnreadJSON;
group: UnreadJSON;
task: UnreadJSON;
meeting: UnreadJSON;
/* eslint-enable camelcase */
}
export class TeamUnread implements TDProtoClass<TeamUnread> {
constructor (
public direct: Unread,
public group: Unread,
public task: Unread
public task: Unread,
public meeting: Unread
) {}
public static fromJSON (raw: TeamUnreadJSON): TeamUnread {
return new TeamUnread(
Unread.fromJSON(raw.direct),
Unread.fromJSON(raw.group),
Unread.fromJSON(raw.task),
Unread.fromJSON(raw.meeting),
)
}
public mappableFields = [
'direct',
'group',
'task',
'meeting',
] as const
readonly #mapper = {
/* eslint-disable camelcase */
direct: () => ({ direct: this.direct.toJSON() }),
group: () => ({ group: this.group.toJSON() }),
task: () => ({ task: this.task.toJSON() }),
meeting: () => ({ task: this.meeting.toJSON() }),
/* eslint-enable camelcase */
}
Expand Down

0 comments on commit 471abe8

Please sign in to comment.