You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
466 B
18 lines
466 B
import type { RecordOf } from 'immutable'; |
|
import { Record } from 'immutable'; |
|
|
|
import type { ApiListJSON } from 'mastodon/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); |
|
}
|
|
|