[Glitch] Remove MastodonMap TS type

Port 7bc13c1ca3 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
lolsob-rspec
Renaud Chaput 2023-05-03 13:32:11 +02:00 committed by Claire
parent ac97d77cb3
commit 2c5141e5ed
2 changed files with 4 additions and 9 deletions

View File

@ -1,9 +1,10 @@
import type { MastodonMap } from './util';
import type { Record } from 'immutable';
type AccountValues = {
id: number;
avatar: string;
avatar_static: string;
[key: string]: any;
}
export type Account = MastodonMap<AccountValues>
};
export type Account = Record<AccountValues>;

View File

@ -1,7 +1 @@
export 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;
}
export type ValueOf<T> = T[keyof T];