0
0
Fork 0

Use Immutable Record for accounts in Redux state (#26559)

This commit is contained in:
Renaud Chaput 2023-11-03 16:00:03 +01:00 committed by GitHub
parent 9d799d40ba
commit 3bf2a7296e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
65 changed files with 765 additions and 662 deletions

View file

@ -1,43 +1,5 @@
// @ts-check
/**
* @typedef Emoji
* @property {string} shortcode
* @property {string} static_url
* @property {string} url
*/
/**
* @typedef AccountField
* @property {string} name
* @property {string} value
* @property {string} verified_at
*/
/**
* @typedef Account
* @property {string} acct
* @property {string} avatar
* @property {string} avatar_static
* @property {boolean} bot
* @property {string} created_at
* @property {boolean=} discoverable
* @property {string} display_name
* @property {Emoji[]} emojis
* @property {AccountField[]} fields
* @property {number} followers_count
* @property {number} following_count
* @property {boolean} group
* @property {string} header
* @property {string} header_static
* @property {string} id
* @property {string=} last_status_at
* @property {boolean} locked
* @property {string} note
* @property {number} statuses_count
* @property {string} url
* @property {string} username
*/
/**
* @typedef {[code: string, name: string, localName: string]} InitialStateLanguage
@ -85,7 +47,7 @@
/**
* @typedef InitialState
* @property {Record<string, Account>} accounts
* @property {Record<string, import("./api_types/accounts").ApiAccountJSON>} accounts
* @property {InitialStateLanguage[]} languages
* @property {boolean=} critical_updates_pending
* @property {InitialStateMeta} meta