From 3e435c252c653e141078b4c9dcdb7e2c3554cd91 Mon Sep 17 00:00:00 2001 From: Spectralitree <72747870+Spectralitree@users.noreply.github.com> Date: Wed, 12 Jan 2022 10:46:05 +0100 Subject: [PATCH] tweak(api): make sure data for the constructor is typed instead of any --- src/api/group.ts | 2 +- src/api/member.ts | 2 +- src/api/system.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/group.ts b/src/api/group.ts index 8bfcf377..6369ee93 100644 --- a/src/api/group.ts +++ b/src/api/group.ts @@ -18,7 +18,7 @@ export default class Group { created?: string; members?: string[]; - constructor(data: any) { + constructor(data: Group) { this.id = data.id; this.uuid = data.uuid; this.name = data.name; diff --git a/src/api/member.ts b/src/api/member.ts index 79820c85..72bf0c54 100644 --- a/src/api/member.ts +++ b/src/api/member.ts @@ -30,7 +30,7 @@ export default class Member { proxy_tags?: Array; privacy?: MemberPrivacy - constructor(data: any) { + constructor(data: Member) { this.id = data.id; this.uuid = data.uuid; this.name = data.name; diff --git a/src/api/system.ts b/src/api/system.ts index d4cb6393..6a01cdb7 100644 --- a/src/api/system.ts +++ b/src/api/system.ts @@ -19,7 +19,7 @@ export default class Sys { privacy?: SystemPrivacy; color?: string; - constructor(data: any) { + constructor(data: Sys) { this.id = data.id; this.uuid = data.uuid; this.name = data.name;