chore(client/ts): fix build errors

This commit is contained in:
Elian Doran 2024-12-21 19:26:12 +02:00
parent 3d2d3b1106
commit c6d04b50fb
No known key found for this signature in database
4 changed files with 8 additions and 11 deletions

View File

@ -7,8 +7,9 @@ import { t } from "./i18n.js";
import { Entity } from "./frontend_script_api.js";
// TODO: Deduplicate with server.
interface Bundle {
export interface Bundle {
script: string;
html: string;
noteId: string;
allNoteIds: string[];
}

View File

@ -2,12 +2,11 @@ import mimeTypesService from "./mime_types.js";
import optionsService from "./options.js";
import { getStylesheetUrl } from "./syntax_highlight.js";
interface Library {
export interface Library {
js?: string[] | (() => string[]);
css?: string[];
}
const CKEDITOR: Library = {
js: ["libraries/ckeditor/ckeditor.js"]
};

View File

@ -1,11 +1,7 @@
import server from "./server.js";
import bundleService from "./bundle.js";
import bundleService, { Bundle } from "./bundle.js";
import FNote from "../entities/fnote.js";
interface Bundle {
html: string;
}
async function render(note: FNote, $el: JQuery<HTMLElement>) {
const relations = note.getRelations('renderNote');
const renderNoteIds = relations

View File

@ -6,6 +6,7 @@ import { Suggestion } from "./services/note_autocomplete.ts";
import utils from "./services/utils.ts";
import appContext from "./components/app_context.ts";
import server from "./services/server.ts";
import library_loader, { Library } from "./services/library_loader.ts";
interface ElectronProcess {
type: string;
@ -21,8 +22,8 @@ interface CustomGlobals {
getReferenceLinkTitle: (href: string) => Promise<string>;
getReferenceLinkTitleSync: (href: string) => string;
getActiveContextNote: FNote;
requireLibrary: (library: string) => Promise<void>;
ESLINT: { js: string[]; };
requireLibrary: typeof library_loader.requireLibrary;
ESLINT: Library;
appContext: AppContext;
froca: Froca;
treeCache: Froca;
@ -70,7 +71,7 @@ declare global {
displayKey: "name" | "value" | "notePathTitle";
cache: boolean;
source: (term: string, cb: AutoCompleteCallback) => void,
templates: {
templates?: {
suggestion: (suggestion: Suggestion) => string | undefined
}
};