diff options
author | Claire <claire.github-309c@sitedethib.com> | 2023-04-03 17:40:59 +0200 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2023-04-03 17:40:59 +0200 |
commit | 4d5b4dacd655159189287e2bdf4501bdcab36981 (patch) | |
tree | 878cbf16609605672bc91c256f823f9cb6df1bf8 /app/javascript/types/resources.ts | |
parent | 8192b0da7cd1fac38a68eab6746fc7ec74328a77 (diff) | |
parent | 77bd32a26abbf8b49caf35dcdf170e312e48a277 (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'app/javascript/types/resources.ts')
-rw-r--r-- | app/javascript/types/resources.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/javascript/types/resources.ts b/app/javascript/types/resources.ts new file mode 100644 index 000000000..372ff7523 --- /dev/null +++ b/app/javascript/types/resources.ts @@ -0,0 +1,13 @@ +interface MastodonMap<T> { + get<K extends keyof T>(key: K): T[K]; + has<K extends keyof T>(key: K): boolean; + set<K extends keyof T>(key: K, value: T[K]): this; +} + +type AccountValues = { + id: number; + avatar: string; + avatar_static: string; + [key: string]: any; +}; +export type Account = MastodonMap<AccountValues>; |