fix: prefer interfaces in static types
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
type CommandPaletteItem = {
|
interface CommandPaletteItem {
|
||||||
id: string;
|
id: string;
|
||||||
type: string;
|
type: string;
|
||||||
label: string;
|
label: string;
|
||||||
@@ -6,7 +6,7 @@ type CommandPaletteItem = {
|
|||||||
href: string;
|
href: string;
|
||||||
image?: string;
|
image?: string;
|
||||||
icon?: string;
|
icon?: string;
|
||||||
};
|
}
|
||||||
|
|
||||||
const commandPaletteInitializedKey = Symbol('commandPaletteInitialized');
|
const commandPaletteInitializedKey = Symbol('commandPaletteInitialized');
|
||||||
const globalWindow = window as Window & { [commandPaletteInitializedKey]?: boolean };
|
const globalWindow = window as Window & { [commandPaletteInitializedKey]?: boolean };
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ export {};
|
|||||||
// JST offset from UTC in minutes (UTC+9)
|
// JST offset from UTC in minutes (UTC+9)
|
||||||
const jstOffsetMinutes = 9 * 60;
|
const jstOffsetMinutes = 9 * 60;
|
||||||
|
|
||||||
type ParsedBroadcast = {
|
interface ParsedBroadcast {
|
||||||
day: string;
|
day: string;
|
||||||
hour: number;
|
hour: number;
|
||||||
minute: number;
|
minute: number;
|
||||||
};
|
}
|
||||||
|
|
||||||
const parseBroadcastTime = (value: string | null): { hour: number; minute: number } | null => {
|
const parseBroadcastTime = (value: string | null): { hour: number; minute: number } | null => {
|
||||||
if (!value || typeof value !== 'string') {
|
if (!value || typeof value !== 'string') {
|
||||||
|
|||||||
Reference in New Issue
Block a user