chore(types): make `Calendar` types readonly

This commit is contained in:
Thomas Rupprecht 2023-09-08 00:12:19 +02:00
parent e711fb11a8
commit ea43a4cd9d
2 changed files with 15 additions and 11 deletions

View File

@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
## \[unreleased]
### 🐛 Bug Fixes
- Update web-ext to support newer browser APIs and remove `addon-linter` override
### 🚜 Refactor
- Inline `fetch` and use `URLSearchParams`

22
types.d.ts vendored
View File

@ -3,17 +3,17 @@ export type Storage = {
spaceApi?: SpaceApi | undefined;
};
export type Calendar = CalendarEntry[];
type CalendarEntry = {
begin: string;
begin_date: `${number}.${number}.${number}`;
begin_time: `${number}:${number}`;
end: string;
end_date: `${number}.${number}.${number}`;
end_time: `${number}:${number}`;
name: string;
description: string | null;
location: string | null;
export type Calendar = readonly CalendarEntry[];
export type CalendarEntry = {
readonly begin: string;
readonly begin_date: `${number}.${number}.${number}`;
readonly begin_time: `${number}:${number}`;
readonly end: string;
readonly end_date: `${number}.${number}.${number}`;
readonly end_time: `${number}:${number}`;
readonly name: string;
readonly description: string | null;
readonly location: string | null;
};
/**