mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-02-03 21:43:40 -05:00
217e0f87fd
Port 62603508c7343f0b9ef880bcbed67c70a9e8375d to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
19 lines
473 B
TypeScript
19 lines
473 B
TypeScript
import type { RecordOf } from 'immutable';
|
|
import { Record } from 'immutable';
|
|
|
|
import type { ApiListJSON } from 'flavours/glitch/api_types/lists';
|
|
|
|
type ListShape = Required<ApiListJSON>; // no changes from server shape
|
|
export type List = RecordOf<ListShape>;
|
|
|
|
const ListFactory = Record<ListShape>({
|
|
id: '',
|
|
title: '',
|
|
exclusive: false,
|
|
replies_policy: 'list',
|
|
});
|
|
|
|
export function createList(attributes: Partial<ListShape>) {
|
|
return ListFactory(attributes);
|
|
}
|