[Glitch] Remove MastodonMap TS type
Port 9a52a7f7a0
to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
pull/59/head^2^2
parent
e8243d5bbd
commit
a33d6c946a
|
@ -1,9 +1,10 @@
|
||||||
import type { MastodonMap } from './util';
|
import type { Record } from 'immutable';
|
||||||
|
|
||||||
type AccountValues = {
|
type AccountValues = {
|
||||||
id: number;
|
id: number;
|
||||||
avatar: string;
|
avatar: string;
|
||||||
avatar_static: string;
|
avatar_static: string;
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
}
|
};
|
||||||
export type Account = MastodonMap<AccountValues>
|
|
||||||
|
export type Account = Record<AccountValues>;
|
||||||
|
|
|
@ -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];
|
export type ValueOf<T> = T[keyof T];
|
||||||
|
|
Loading…
Reference in New Issue