From 4520e6473afe901005e7ac532317f4b4f1af9ead Mon Sep 17 00:00:00 2001 From: fusagiko / takayamaki <24884114+takayamaki@users.noreply.github.com> Date: Mon, 3 Apr 2023 10:31:39 +0900 Subject: [Proposal] Make able to write React in Typescript (#16210) Co-authored-by: berlysia Co-authored-by: fusagiko / takayamaki --- app/javascript/types/resources.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 app/javascript/types/resources.ts (limited to 'app/javascript/types') diff --git a/app/javascript/types/resources.ts b/app/javascript/types/resources.ts new file mode 100644 index 000000000..efbb1faa7 --- /dev/null +++ b/app/javascript/types/resources.ts @@ -0,0 +1,13 @@ +interface MastodonMap { + get(key: K): T[K]; + has(key: K): boolean; + set(key: K, value: T[K]): this; +} + +type AccountValues = { + id: number; + avatar: string; + avatar_static: string; + [key: string]: any; +} +export type Account = MastodonMap -- cgit