1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Remove MastodonMap TS type (#24807)

This commit is contained in:
Renaud Chaput 2023-05-03 13:32:11 +02:00 committed by GitHub
parent e38b391940
commit 9a52a7f7a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 8 deletions

View file

@ -1,4 +1,4 @@
import type { MastodonMap } from './util';
import type { Record } from 'immutable';
type AccountValues = {
id: number;
@ -6,4 +6,5 @@ type AccountValues = {
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];