mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	fix(monorepo/client): errors in type definition
This commit is contained in:
		
							parent
							
								
									920e1dbcd0
								
							
						
					
					
						commit
						13a6fefaa2
					
				
							
								
								
									
										21
									
								
								apps/client/src/types.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										21
									
								
								apps/client/src/types.d.ts
									
									
									
									
										vendored
									
									
								
							| @ -2,13 +2,11 @@ import type FNote from "./entities/fnote"; | |||||||
| import type { Froca } from "./services/froca-interface"; | import type { Froca } from "./services/froca-interface"; | ||||||
| import { Suggestion } from "./services/note_autocomplete.ts"; | 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, { 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"; | import library_loader, { Library } from "./services/library_loader.ts"; | ||||||
| import type { init } from "i18next"; |  | ||||||
| import type { lint } from "./services/eslint.ts"; | import type { lint } from "./services/eslint.ts"; | ||||||
| import type { RelationType } from "./widgets/type_widgets/relation_map.ts"; | import type { Mermaid, MermaidConfig } from "mermaid"; | ||||||
| import type { Mermaid } from "mermaid"; |  | ||||||
| 
 | 
 | ||||||
| interface ElectronProcess { | interface ElectronProcess { | ||||||
|     type: string; |     type: string; | ||||||
| @ -23,7 +21,7 @@ interface CustomGlobals { | |||||||
|     getHeaders: typeof server.getHeaders; |     getHeaders: typeof server.getHeaders; | ||||||
|     getReferenceLinkTitle: (href: string) => Promise<string>; |     getReferenceLinkTitle: (href: string) => Promise<string>; | ||||||
|     getReferenceLinkTitleSync: (href: string) => string; |     getReferenceLinkTitleSync: (href: string) => string; | ||||||
|     getActiveContextNote: FNote; |     getActiveContextNote: () => FNote; | ||||||
|     requireLibrary: typeof library_loader.requireLibrary; |     requireLibrary: typeof library_loader.requireLibrary; | ||||||
|     ESLINT: Library; |     ESLINT: Library; | ||||||
|     appContext: AppContext; |     appContext: AppContext; | ||||||
| @ -73,7 +71,7 @@ declare global { | |||||||
|         debug?: boolean; |         debug?: boolean; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     type AutoCompleteCallback = (values: AutoCompleteCallbackArg[]) => void; |     type AutoCompleteCallback = (values: AutoCompleteArg[]) => void; | ||||||
| 
 | 
 | ||||||
|     interface AutoCompleteArg { |     interface AutoCompleteArg { | ||||||
|         displayKey: "name" | "value" | "notePathTitle"; |         displayKey: "name" | "value" | "notePathTitle"; | ||||||
| @ -85,7 +83,7 @@ declare global { | |||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     interface JQuery { |     interface JQuery { | ||||||
|         autocomplete: (action?: "close" | "open" | "destroy" | "val" | AutoCompleteConfig, args?: AutoCompleteArg[] | string) => JQuery<?>; |         autocomplete: (action?: "close" | "open" | "destroy" | "val" | AutoCompleteConfig, args?: AutoCompleteArg[] | string) => JQuery<HTMLElement>; | ||||||
| 
 | 
 | ||||||
|         getSelectedNotePath(): string | undefined; |         getSelectedNotePath(): string | undefined; | ||||||
|         getSelectedNoteId(): string | null; |         getSelectedNoteId(): string | null; | ||||||
| @ -118,6 +116,7 @@ declare global { | |||||||
|     var logError: (message: string, e?: Error | string) => void; |     var logError: (message: string, e?: Error | string) => void; | ||||||
|     var logInfo: (message: string) => void; |     var logInfo: (message: string) => void; | ||||||
|     var glob: CustomGlobals; |     var glob: CustomGlobals; | ||||||
|  |     //@ts-ignore
 | ||||||
|     var require: RequireMethod; |     var require: RequireMethod; | ||||||
|     var __non_webpack_require__: RequireMethod | undefined; |     var __non_webpack_require__: RequireMethod | undefined; | ||||||
| 
 | 
 | ||||||
| @ -137,6 +136,10 @@ declare global { | |||||||
|         label: string; |         label: string; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     interface CKEditorInstance { | ||||||
|  | 
 | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     interface CKWatchdog { |     interface CKWatchdog { | ||||||
|         constructor(editorClass: CKEditorInstance, opts: { |         constructor(editorClass: CKEditorInstance, opts: { | ||||||
|             minimumNonErrorTimePeriod: number; |             minimumNonErrorTimePeriod: number; | ||||||
| @ -172,7 +175,7 @@ declare global { | |||||||
|     var CKEditor: { |     var CKEditor: { | ||||||
|         BalloonEditor: CKEditorInstance; |         BalloonEditor: CKEditorInstance; | ||||||
|         DecoupledEditor: CKEditorInstance; |         DecoupledEditor: CKEditorInstance; | ||||||
|         EditorWatchdog: typeof CKWatchdog; |         EditorWatchdog: CKWatchdog; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     var CKEditorInspector: { |     var CKEditorInspector: { | ||||||
| @ -260,7 +263,7 @@ declare global { | |||||||
|     interface Writer { |     interface Writer { | ||||||
|         setAttribute(name: string, value: string, el: CKNode); |         setAttribute(name: string, value: string, el: CKNode); | ||||||
|         createPositionAt(el: CKNode, opt?: "end" | number); |         createPositionAt(el: CKNode, opt?: "end" | number); | ||||||
|         setSelection(pos: number, pos?: number); |         setSelection(pos: number, pos2?: number); | ||||||
|         insertText(text: string, opts: Record<string, unknown> | undefined | TextPosition, position?: TextPosition); |         insertText(text: string, opts: Record<string, unknown> | undefined | TextPosition, position?: TextPosition); | ||||||
|         addMarker(name: string, opts: { |         addMarker(name: string, opts: { | ||||||
|             range: Range; |             range: Range; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran