sejm-calculator/src/types.ts

22 wiersze
438 B
TypeScript

2024-01-10 21:58:43 +00:00
type PastCommiteeId = 'pis' | 'ko' | 'td' | 'lewica' | 'konfederacja';
2019-09-07 21:11:03 +00:00
export type PastSupport = {
[pastCommitteeId in PastCommiteeId]: number;
2024-01-10 21:58:43 +00:00
};
2019-09-07 21:11:03 +00:00
export type Committee = {
2024-01-10 21:58:43 +00:00
id: string,
name: string,
shortName: string,
threshold: number,
pastSupportEquivalence: Array<[PastCommiteeId, number]>,
};
2019-09-07 21:11:03 +00:00
export type Constituency = {
2024-01-10 21:58:43 +00:00
name: string,
size: number,
pastSupport: PastSupport,
support?: number[],
mandates?: number[],
};