File size: 1,280 Bytes
96dd062 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | declare global {
interface HTMLElementTagNameMap {
"table-of-contents": HTMLElement & {
init?: () => void;
};
}
interface Window {
// biome-ignore lint/suspicious/noExplicitAny: External library
swup: any;
live2dModelInitialized?: boolean;
spineModelInitialized?: boolean;
floatingTOCListenersInitialized?: boolean;
// biome-ignore lint/suspicious/noExplicitAny: External library
spinePlayerInstance?: any;
pagefind: {
search: (query: string) => Promise<{
results: Array<{
data: () => Promise<SearchResult>;
}>;
}>;
};
}
interface MediaQueryList {
addListener(listener: (e: MediaQueryListEvent) => void): void;
removeListener(listener: (e: MediaQueryListEvent) => void): void;
}
}
interface SearchResult {
url: string;
meta: {
title: string;
};
excerpt: string;
content?: string;
word_count?: number;
filters?: Record<string, unknown>;
anchors?: Array<{
element: string;
id: string;
text: string;
location: number;
}>;
weighted_locations?: Array<{
weight: number;
balanced_score: number;
location: number;
}>;
locations?: number[];
raw_content?: string;
raw_url?: string;
sub_results?: SearchResult[];
}
export type { SearchResult };
|