mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-10 18:39:22 +08:00
chore(client/ts): fix build errors
This commit is contained in:
parent
3d2d3b1106
commit
c6d04b50fb
@ -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[];
|
||||
}
|
||||
|
@ -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"]
|
||||
};
|
||||
|
@ -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
|
||||
|
7
src/public/app/types.d.ts
vendored
7
src/public/app/types.d.ts
vendored
@ -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
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user