Skip to content

Commit

Permalink
chore: typings
Browse files Browse the repository at this point in the history
  • Loading branch information
valentine195 committed Feb 20, 2024
1 parent ae46b51 commit 6bf30fe
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
11 changes: 7 additions & 4 deletions src/calendar/ui/Day/Day.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
import { getTypedContext } from "../../view";
import Dots from "../Events/Dots.svelte";
import { Menu, TFile } from "obsidian";
import type { DayOrLeapDay, CalEvent } from "src/@types";
import type { CalEvent } from "src/@types";
import Moon from "../Moon.svelte";
import { ViewState } from "src/stores/calendar.store";
import Flags from "../Events/Flags.svelte";
import { addEventWithModal } from "src/settings/modals/event/event";
import type { DayOrLeapDay } from "src/schemas/calendar/timespans";
export let month: MonthStore;
export let day: DayOrLeapDay;
Expand Down Expand Up @@ -81,7 +82,7 @@
month: $index,
year: year.year,
});
})
}),
);
let notes: { event: CalEvent; file: TFile }[] = [];
for (const event of $events) {
Expand All @@ -98,7 +99,7 @@
menu.addItem((item) =>
item.setTitle(`Open ${event.name}`).onClick(() => {
app.workspace.getLeaf().openFile(file);
})
}),
);
}
}
Expand Down Expand Up @@ -167,7 +168,9 @@
padding: 4px;
position: relative;
text-align: center;
transition: background-color 0.1s ease-in, color 0.1s ease-in;
transition:
background-color 0.1s ease-in,
color 0.1s ease-in;
vertical-align: baseline;
display: flex;
flex-flow: column nowrap;
Expand Down
2 changes: 1 addition & 1 deletion src/schemas/calendar/moons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ export type Phase =
| "New Moon Risen";

export type MoonState = Moon & {
phase: Phase;
phase: Phase | undefined;
};
2 changes: 1 addition & 1 deletion src/stores/cache/moon-cache.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { MoonState } from "src/@types";
import { DayCache, EntityCache, MonthCache, YearCache } from "./entity-cache";
import { type Readable, get } from "svelte/store";
import { YearStoreCache } from "../years.store";
import { MOON_PHASES } from "src/utils/constants";
import { wrap } from "src/utils/functions";
import type { MoonState } from "src/schemas/calendar/moons";

class YearMoonCache extends YearCache<MoonState> {
update(moons: MoonState[]) {
Expand Down
2 changes: 1 addition & 1 deletion src/stores/calendar.store.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type {
Calendar,
CalDate,
MoonState,
CalEventCategory,
} from "src/@types";
import {
Expand All @@ -16,6 +15,7 @@ import { dateString } from "src/utils/functions";
import { MoonCache } from "./cache/moon-cache";
import type Calendarium from "src/main";
import { EventStore } from "./events.store";
import type { MoonState } from "src/schemas/calendar/moons";

export type CalendarStore = ReturnType<typeof createCalendarStore>;

Expand Down

0 comments on commit 6bf30fe

Please sign in to comment.