mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-18 00:02:28 +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";
|
import { Entity } from "./frontend_script_api.js";
|
||||||
|
|
||||||
// TODO: Deduplicate with server.
|
// TODO: Deduplicate with server.
|
||||||
interface Bundle {
|
export interface Bundle {
|
||||||
script: string;
|
script: string;
|
||||||
|
html: string;
|
||||||
noteId: string;
|
noteId: string;
|
||||||
allNoteIds: string[];
|
allNoteIds: string[];
|
||||||
}
|
}
|
||||||
|
@ -2,12 +2,11 @@ import mimeTypesService from "./mime_types.js";
|
|||||||
import optionsService from "./options.js";
|
import optionsService from "./options.js";
|
||||||
import { getStylesheetUrl } from "./syntax_highlight.js";
|
import { getStylesheetUrl } from "./syntax_highlight.js";
|
||||||
|
|
||||||
interface Library {
|
export interface Library {
|
||||||
js?: string[] | (() => string[]);
|
js?: string[] | (() => string[]);
|
||||||
css?: string[];
|
css?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const CKEDITOR: Library = {
|
const CKEDITOR: Library = {
|
||||||
js: ["libraries/ckeditor/ckeditor.js"]
|
js: ["libraries/ckeditor/ckeditor.js"]
|
||||||
};
|
};
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
import server from "./server.js";
|
import server from "./server.js";
|
||||||
import bundleService from "./bundle.js";
|
import bundleService, { Bundle } from "./bundle.js";
|
||||||
import FNote from "../entities/fnote.js";
|
import FNote from "../entities/fnote.js";
|
||||||
|
|
||||||
interface Bundle {
|
|
||||||
html: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function render(note: FNote, $el: JQuery<HTMLElement>) {
|
async function render(note: FNote, $el: JQuery<HTMLElement>) {
|
||||||
const relations = note.getRelations('renderNote');
|
const relations = note.getRelations('renderNote');
|
||||||
const renderNoteIds = relations
|
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 utils from "./services/utils.ts";
|
||||||
import appContext from "./components/app_context.ts";
|
import appContext from "./components/app_context.ts";
|
||||||
import server from "./services/server.ts";
|
import server from "./services/server.ts";
|
||||||
|
import library_loader, { Library } from "./services/library_loader.ts";
|
||||||
|
|
||||||
interface ElectronProcess {
|
interface ElectronProcess {
|
||||||
type: string;
|
type: string;
|
||||||
@ -21,8 +22,8 @@ interface CustomGlobals {
|
|||||||
getReferenceLinkTitle: (href: string) => Promise<string>;
|
getReferenceLinkTitle: (href: string) => Promise<string>;
|
||||||
getReferenceLinkTitleSync: (href: string) => string;
|
getReferenceLinkTitleSync: (href: string) => string;
|
||||||
getActiveContextNote: FNote;
|
getActiveContextNote: FNote;
|
||||||
requireLibrary: (library: string) => Promise<void>;
|
requireLibrary: typeof library_loader.requireLibrary;
|
||||||
ESLINT: { js: string[]; };
|
ESLINT: Library;
|
||||||
appContext: AppContext;
|
appContext: AppContext;
|
||||||
froca: Froca;
|
froca: Froca;
|
||||||
treeCache: Froca;
|
treeCache: Froca;
|
||||||
@ -70,7 +71,7 @@ declare global {
|
|||||||
displayKey: "name" | "value" | "notePathTitle";
|
displayKey: "name" | "value" | "notePathTitle";
|
||||||
cache: boolean;
|
cache: boolean;
|
||||||
source: (term: string, cb: AutoCompleteCallback) => void,
|
source: (term: string, cb: AutoCompleteCallback) => void,
|
||||||
templates: {
|
templates?: {
|
||||||
suggestion: (suggestion: Suggestion) => string | undefined
|
suggestion: (suggestion: Suggestion) => string | undefined
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user