obsidian-typings 4.109.0 → 4.110.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,9 +67,17 @@ export declare class HighlightOutline extends Outline {
67
67
  constructor(outlines: unknown, box: unknown, lastPoint: any);
68
68
  /** The last point of the highlight used for directional calculations. */
69
69
  lastPoint: unknown;
70
- /** The bounding box of the highlight outline. */
70
+ /**
71
+ * The bounding box of the highlight outline.
72
+ *
73
+ * @returns The bounding box, or null.
74
+ */
71
75
  get box(): Object | null;
72
- /** CSS class names applied when outlining this highlight. */
76
+ /**
77
+ * CSS class names applied when outlining this highlight.
78
+ *
79
+ * @returns The class names for outlining.
80
+ */
73
81
  get classNamesForOutlining(): string[];
74
82
  /**
75
83
  * Serialize the outlines into the PDF page coordinate system.
@@ -105,7 +113,11 @@ export declare class HighlightOutliner {
105
113
  * the last point of the boxes.
106
114
  */
107
115
  constructor(boxes: Array<Object>, borderWidth?: number, innerMargin?: number, isLTR?: boolean);
108
- /** Compute and return the highlight outlines for the given boxes. */
116
+ /**
117
+ * Compute and return the highlight outlines for the given boxes.
118
+ *
119
+ * @returns The computed highlight outlines.
120
+ */
109
121
  getOutlines(): HighlightOutline;
110
122
  }
111
123
  /**
@@ -122,26 +134,59 @@ export declare class Outline {
122
134
  * @returns The bounding box of the outline.
123
135
  */
124
136
  get box(): Object | null;
125
- /** Serialize the outline into the PDF page coordinate system. */
137
+ /**
138
+ * Serialize the outline into the PDF page coordinate system.
139
+ *
140
+ * @param bbox - The bounding box as bottom-left and top-right coordinates.
141
+ * @param rotation - The page rotation in degrees.
142
+ */
126
143
  serialize(bbox: [
127
144
  blX: string,
128
145
  blY: string,
129
146
  trX: string,
130
147
  trY: string
131
148
  ], rotation: number): void;
132
- /** Normalize a point relative to the page with the given rotation. */
149
+ /**
150
+ * Normalize a point relative to the page with the given rotation.
151
+ *
152
+ * @returns The normalized point coordinates.
153
+ */
133
154
  static _normalizePagePoint(x: unknown, y: unknown, rotation: unknown): unknown[];
134
- /** Normalize a point relative to a parent element with the given dimensions and rotation. */
155
+ /**
156
+ * Normalize a point relative to a parent element with the given dimensions and rotation.
157
+ *
158
+ * @returns The normalized point coordinates.
159
+ */
135
160
  static _normalizePoint(x: unknown, y: unknown, parentWidth: unknown, parentHeight: unknown, rotation: unknown): number[];
136
- /** Rescale coordinates by translation and scale factors. */
161
+ /**
162
+ * Rescale coordinates by translation and scale factors.
163
+ *
164
+ * @returns The rescaled coordinates.
165
+ */
137
166
  static _rescale(src: unknown, tx: unknown, ty: unknown, sx: unknown, sy: unknown, dest: unknown): unknown;
138
- /** Rescale and swap coordinates by translation and scale factors. */
167
+ /**
168
+ * Rescale and swap coordinates by translation and scale factors.
169
+ *
170
+ * @returns The rescaled and swapped coordinates.
171
+ */
139
172
  static _rescaleAndSwap(src: unknown, tx: unknown, ty: unknown, sx: unknown, sy: unknown, dest: unknown): unknown;
140
- /** Translate coordinates by the given offsets. */
173
+ /**
174
+ * Translate coordinates by the given offsets.
175
+ *
176
+ * @returns The translated coordinates.
177
+ */
141
178
  static _translate(src: unknown, tx: unknown, ty: unknown, dest: unknown): unknown;
142
- /** Create cubic bezier control points between two endpoints. */
179
+ /**
180
+ * Create cubic bezier control points between two endpoints.
181
+ *
182
+ * @returns The bezier control point coordinates.
183
+ */
143
184
  static createBezierPoints(x1: unknown, y1: unknown, x2: unknown, y2: unknown, x3: unknown, y3: unknown): number[];
144
- /** Round a number to the configured SVG precision. */
185
+ /**
186
+ * Round a number to the configured SVG precision.
187
+ *
188
+ * @returns The rounded number.
189
+ */
145
190
  static svgRound(x: unknown): number;
146
191
  /**
147
192
  * Converts the outline to an SVG path.
@@ -530,9 +575,17 @@ export interface AbstractFileTreeItem<T extends TAbstractFile> extends TreeItem
530
575
  rendered: boolean;
531
576
  /** Reference to the file explorer view containing this item. */
532
577
  view: FileExplorerView;
533
- /** Get the display title for this tree item. */
578
+ /**
579
+ * Get the display title for this tree item.
580
+ *
581
+ * @returns The display title.
582
+ */
534
583
  getTitle(): string;
535
- /** Whether the full timestamp is shown for this item. */
584
+ /**
585
+ * Whether the full timestamp is shown for this item.
586
+ *
587
+ * @returns Whether the full timestamp is shown.
588
+ */
536
589
  isFullTimeShown(): boolean;
537
590
  /** Called when this item is rendered to the DOM. */
538
591
  onRender(): void;
@@ -587,18 +640,21 @@ export interface AbstractSearchComponent {
587
640
  * Switch to the next inputElement.
588
641
  *
589
642
  * @param event - The keyboard event that triggered the input switch.
643
+ * @returns The result of switching to the next input.
590
644
  */
591
645
  goToNextInput(event: KeyboardEvent): unknown;
592
646
  /**
593
647
  * Invokes findNextOrReplace.
594
648
  *
595
649
  * @param event - The keyboard event that triggered the action.
650
+ * @returns The result of the enter action.
596
651
  */
597
652
  onEnter(event: KeyboardEvent): unknown;
598
653
  /**
599
654
  * Invokes findPrevious.
600
655
  *
601
656
  * @param event - The keyboard event that triggered the action.
657
+ * @returns The result of the shift-enter action.
602
658
  */
603
659
  onShiftEnter(event: KeyboardEvent): unknown;
604
660
  }
@@ -682,6 +738,8 @@ export interface AliasesPropertyWidgetComponent extends PropertyWidgetComponentB
682
738
  export interface AllPropertiesView extends ItemView {
683
739
  /**
684
740
  * Try to rename the file.
741
+ *
742
+ * @returns A promise that resolves when the rename is complete.
685
743
  */
686
744
  acceptRename(): Promise<void>;
687
745
  /**
@@ -694,9 +752,16 @@ export interface AllPropertiesView extends ItemView {
694
752
  exitRename(): void;
695
753
  /**
696
754
  * Get the current view type.
755
+ *
756
+ * @returns The all properties view type.
697
757
  */
698
758
  getViewType(): typeof ViewType.AllProperties;
699
- /** Check whether the given object is a property item. */
759
+ /**
760
+ * Check whether the given object is a property item.
761
+ *
762
+ * @param e - The object to check.
763
+ * @returns Whether the object is a property item.
764
+ */
700
765
  isItem(e: unknown): boolean;
701
766
  /**
702
767
  * Select the item in focus if pressed 'Enter'.
@@ -714,7 +779,11 @@ export interface AllPropertiesView extends ItemView {
714
779
  * Toggles the visibility of the search.
715
780
  */
716
781
  onToggleShowSearch(): void;
717
- /** Set the visibility of the search filter. */
782
+ /**
783
+ * Set the visibility of the search filter.
784
+ *
785
+ * @param e - Whether to show the search filter.
786
+ */
718
787
  setShowSearch(e: boolean): void;
719
788
  /**
720
789
  * Updates the sort order and sort by it.
@@ -726,7 +795,12 @@ export interface AllPropertiesView extends ItemView {
726
795
  * Shows the search and focus is.
727
796
  */
728
797
  showSearch(): void;
729
- /** Begin inline renaming of a property. */
798
+ /**
799
+ * Begin inline renaming of a property.
800
+ *
801
+ * @param e - The property item to rename.
802
+ * @returns The result of the rename operation.
803
+ */
730
804
  startRename(e: unknown): Promise<unknown>;
731
805
  /** Refresh the properties list. */
732
806
  update(): void;
@@ -1206,9 +1280,17 @@ export interface AudioRecorderPluginInstance extends InternalPluginInstance<Audi
1206
1280
  * @returns Whether microphone permission is granted.
1207
1281
  */
1208
1282
  checkPermission(): Promise<boolean>;
1209
- /** Initiate the audio recording flow. */
1283
+ /**
1284
+ * Initiate the audio recording flow.
1285
+ *
1286
+ * @returns A promise that resolves when the recording flow completes.
1287
+ */
1210
1288
  onRecordAudio(): Promise<void>;
1211
- /** Start a new audio recording session. */
1289
+ /**
1290
+ * Start a new audio recording session.
1291
+ *
1292
+ * @returns A promise that resolves when recording has started.
1293
+ */
1212
1294
  onStartRecording(): Promise<void>;
1213
1295
  /** Stop the current audio recording session. */
1214
1296
  onStopRecording(): void;
@@ -1216,6 +1298,7 @@ export interface AudioRecorderPluginInstance extends InternalPluginInstance<Audi
1216
1298
  * Save the recorded audio buffer to a file in the vault.
1217
1299
  *
1218
1300
  * @param audioBuffer - The recorded audio data.
1301
+ * @returns A promise that resolves when the recording is saved.
1219
1302
  */
1220
1303
  saveRecording(audioBuffer: ArrayBuffer): Promise<void>;
1221
1304
  /**
@@ -1325,7 +1408,11 @@ export interface BacklinkComponent extends Component {
1325
1408
  unlinkedHeaderEl: HTMLDivElement;
1326
1409
  /** Queue of files to process for unlinked mention computation. */
1327
1410
  unlinkedQueue: null;
1328
- /** Add a link from an unlinked mention to the target file. */
1411
+ /**
1412
+ * Add a link from an unlinked mention to the target file.
1413
+ *
1414
+ * @returns The result of adding the link.
1415
+ */
1329
1416
  addLinkFunction(arg1: unknown, arg2: unknown, arg3: unknown): unknown;
1330
1417
  /**
1331
1418
  * Get the current state of the backlink component.
@@ -1405,7 +1492,11 @@ export interface BacklinkComponent extends Component {
1405
1492
  * @returns The recomputation result.
1406
1493
  */
1407
1494
  recomputeUnlinked(arg1: unknown): unknown;
1408
- /** Set whether the backlink section is collapsed. */
1495
+ /**
1496
+ * Set whether the backlink section is collapsed.
1497
+ *
1498
+ * @returns The result of setting backlink collapsed state.
1499
+ */
1409
1500
  setBacklinkCollapsed(arg1: unknown, arg2: unknown): Promise<unknown>;
1410
1501
  /**
1411
1502
  * Set whether all results are collapsed.
@@ -1419,7 +1510,11 @@ export interface BacklinkComponent extends Component {
1419
1510
  * @returns The result of setting extra context.
1420
1511
  */
1421
1512
  setExtraContext(arg1: unknown): unknown;
1422
- /** Set the collapsed state of a specific section. */
1513
+ /**
1514
+ * Set the collapsed state of a specific section.
1515
+ *
1516
+ * @returns The result of setting the section collapsed state.
1517
+ */
1423
1518
  setSectionCollapsed(arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown): Promise<unknown>;
1424
1519
  /**
1425
1520
  * Set the visibility of the search filter.
@@ -1433,9 +1528,17 @@ export interface BacklinkComponent extends Component {
1433
1528
  * @returns The result of setting sort order.
1434
1529
  */
1435
1530
  setSortOrder(arg1: unknown): unknown;
1436
- /** Restore the component from a saved state. */
1531
+ /**
1532
+ * Restore the component from a saved state.
1533
+ *
1534
+ * @returns The result of restoring the state.
1535
+ */
1437
1536
  setState(arg1: unknown): Promise<unknown>;
1438
- /** Set whether the unlinked mentions section is collapsed. */
1537
+ /**
1538
+ * Set whether the unlinked mentions section is collapsed.
1539
+ *
1540
+ * @returns The result of setting unlinked collapsed state.
1541
+ */
1439
1542
  setUnlinkedCollapsed(arg1: unknown, arg2: unknown): Promise<unknown>;
1440
1543
  /** Cancel the current backlink search computation. */
1441
1544
  stopBacklinkSearch(): void;
@@ -1463,7 +1566,11 @@ export interface BacklinkComponent extends Component {
1463
1566
  * @returns The update result.
1464
1567
  */
1465
1568
  update(): unknown;
1466
- /** Update the tooltip text of a section header. */
1569
+ /**
1570
+ * Update the tooltip text of a section header.
1571
+ *
1572
+ * @returns The result of updating the header tooltip.
1573
+ */
1467
1574
  updateHeaderTooltip(arg1: unknown, arg2: unknown): unknown;
1468
1575
  /**
1469
1576
  * Refresh the search filter and recompute filtered results.
@@ -1504,9 +1611,14 @@ export interface BacklinkPluginInstance extends InternalPluginInstance<BacklinkP
1504
1611
  *
1505
1612
  * @param app - The app instance.
1506
1613
  * @param plugin - The backlink plugin registration.
1614
+ * @returns A promise that resolves when the plugin is enabled.
1507
1615
  */
1508
1616
  onEnable(app: App, plugin: BacklinkPlugin): Promise<void>;
1509
- /** Handle external settings file changes and reload configuration. */
1617
+ /**
1618
+ * Handle external settings file changes and reload configuration.
1619
+ *
1620
+ * @returns A promise that resolves when the settings are reloaded.
1621
+ */
1510
1622
  onExternalSettingsChange(): Promise<void>;
1511
1623
  /**
1512
1624
  * Add backlink-related items to a file context menu.
@@ -1707,7 +1819,7 @@ export interface BasesControl {
1707
1819
  * Render to.
1708
1820
  *
1709
1821
  * @param containerEl - The container element.
1710
- * @param t - The data to render.
1822
+ * @param renderContext - The render context.
1711
1823
  */
1712
1824
  renderTo(containerEl: HTMLElement, renderContext: RenderContext): void;
1713
1825
  }
@@ -2058,10 +2170,16 @@ export interface BasesFunction {
2058
2170
  returnType: string;
2059
2171
  /**
2060
2172
  * Applies the function.
2173
+ *
2174
+ * @param args - The arguments to apply.
2175
+ * @returns The result of applying the function.
2061
2176
  */
2062
2177
  apply(...args: unknown[]): unknown;
2063
2178
  /**
2064
2179
  * Serializes the function.
2180
+ *
2181
+ * @param args - The arguments to serialize.
2182
+ * @returns The serialized function string.
2065
2183
  */
2066
2184
  serialize(...args: unknown[]): string;
2067
2185
  }
@@ -2075,7 +2193,7 @@ export interface BasesFunctionArg {
2075
2193
  /**
2076
2194
  * Whether to include custom types.
2077
2195
  */
2078
- include_custom_types?: boolean;
2196
+ includeCustomTypes?: boolean;
2079
2197
  /**
2080
2198
  * The name of the argument.
2081
2199
  */
@@ -2440,6 +2558,7 @@ export interface BasesPluginInstance extends InternalPluginInstance<BasesPlugin>
2440
2558
  * Creates and embeds a base.
2441
2559
  *
2442
2560
  * @param editor - The editor to embed the base into.
2561
+ * @returns A promise that resolves when the base is created and embedded.
2443
2562
  */
2444
2563
  createAndEmbedBase(editor: Editor): Promise<void>;
2445
2564
  /**
@@ -2533,18 +2652,27 @@ export interface BasesProperty {
2533
2652
  unrecognizedData: object;
2534
2653
  /**
2535
2654
  * Gets the display name.
2655
+ *
2656
+ * @returns The display name.
2536
2657
  */
2537
2658
  getDisplayName(): string;
2538
2659
  /**
2539
2660
  * Migrates the display name.
2661
+ *
2662
+ * @param getDisplayName - The display name to migrate.
2663
+ * @returns The migrated display name.
2540
2664
  */
2541
2665
  migrateDisplayName(getDisplayName: string): string;
2542
2666
  /**
2543
2667
  * Serializes the property.
2668
+ *
2669
+ * @returns The serialized property data.
2544
2670
  */
2545
2671
  serialize(): object;
2546
2672
  /**
2547
2673
  * Sets the display name.
2674
+ *
2675
+ * @param displayName - The display name to set.
2548
2676
  */
2549
2677
  setDisplayName(displayName: string): void;
2550
2678
  }
@@ -2787,6 +2915,8 @@ export interface BasesView extends TextFileView {
2787
2915
  query: BasesQuery;
2788
2916
  /**
2789
2917
  * Get view type.
2918
+ *
2919
+ * @returns The bases view type.
2790
2920
  */
2791
2921
  getViewType(): typeof ViewType.Bases;
2792
2922
  /**
@@ -2799,10 +2929,14 @@ export interface BasesView extends TextFileView {
2799
2929
  onViewChanged(): void;
2800
2930
  /**
2801
2931
  * Receives the sync state.
2932
+ *
2933
+ * @param fileView - The file view to receive the sync state from.
2802
2934
  */
2803
2935
  receiveSyncState(fileView: FileView): void;
2804
2936
  /**
2805
2937
  * Saves the query.
2938
+ *
2939
+ * @param query - The query to save.
2806
2940
  */
2807
2941
  saveQuery(query: BasesQuery): void;
2808
2942
  /**
@@ -3019,9 +3153,14 @@ export interface BookmarksPluginInstance extends InternalPluginInstance<Bookmark
3019
3153
  *
3020
3154
  * @param app - The app instance.
3021
3155
  * @param plugin - The bookmarks plugin registration.
3156
+ * @returns A promise that resolves when the plugin is enabled.
3022
3157
  */
3023
3158
  onEnable(app: App, plugin: BookmarksPlugin): Promise<void>;
3024
- /** Handle external settings file changes and reload configuration. */
3159
+ /**
3160
+ * Handle external settings file changes and reload configuration.
3161
+ *
3162
+ * @returns A promise that resolves when the settings are reloaded.
3163
+ */
3025
3164
  onExternalSettingsChange(): Promise<void>;
3026
3165
  /**
3027
3166
  * Add bookmark-related items to a file context menu.
@@ -3077,6 +3216,7 @@ export interface BookmarksPluginInstance extends InternalPluginInstance<Bookmark
3077
3216
  * @param item - The bookmark item to open.
3078
3217
  * @param newLeaf - Where to open the bookmark.
3079
3218
  * @param newLeaf2 - Optional secondary pane type.
3219
+ * @returns A promise that resolves when the bookmark is opened.
3080
3220
  */
3081
3221
  openBookmark(item: BookmarkItem, newLeaf: PaneType | boolean, newLeaf2?: PaneType | boolean): Promise<void>;
3082
3222
  /**
@@ -3085,6 +3225,7 @@ export interface BookmarksPluginInstance extends InternalPluginInstance<Bookmark
3085
3225
  * @param item - The bookmark item to open.
3086
3226
  * @param leaf - The target workspace leaf.
3087
3227
  * @param newLeaf - Optional pane type override.
3228
+ * @returns A promise that resolves when the bookmark is opened in the leaf.
3088
3229
  */
3089
3230
  openBookmarkInLeaf(item: BookmarkItem, leaf: WorkspaceLeaf, newLeaf?: PaneType | boolean): Promise<void>;
3090
3231
  /**
@@ -3092,6 +3233,7 @@ export interface BookmarksPluginInstance extends InternalPluginInstance<Bookmark
3092
3233
  *
3093
3234
  * @param items - The bookmark items to open.
3094
3235
  * @param newLeaf - Optional pane type for opening.
3236
+ * @returns A promise that resolves when all bookmarks are opened.
3095
3237
  */
3096
3238
  openBookmarks(items: BookmarkItem[], newLeaf?: PaneType | boolean): Promise<void>;
3097
3239
  /** Rebuild the internal bookmark lookup caches. */
@@ -3113,7 +3255,13 @@ export interface BookmarksPluginInstance extends InternalPluginInstance<Bookmark
3113
3255
  * @unofficial
3114
3256
  */
3115
3257
  export interface BookmarksPluginViews extends Record<string, ViewCreator> {
3116
- /** Create a bookmarks view in the given workspace leaf. */
3258
+ /**
3259
+ * Create a bookmarks view in the given workspace leaf.
3260
+ *
3261
+ * @param left - The workspace leaf to create the bookmarks view in.
3262
+ * @returns The created bookmarks view.
3263
+ * @unofficial
3264
+ */
3117
3265
  bookmarks(left: WorkspaceLeaf): BookmarksView;
3118
3266
  }
3119
3267
  /**
@@ -3175,6 +3323,8 @@ export interface BookmarksView extends ItemView {
3175
3323
  getNodeId(e: unknown): string;
3176
3324
  /**
3177
3325
  * Get the current view type.
3326
+ *
3327
+ * @returns The bookmarks view type.
3178
3328
  */
3179
3329
  getViewType(): typeof ViewType.Bookmarks;
3180
3330
  /**
@@ -3200,6 +3350,7 @@ export interface BookmarksView extends ItemView {
3200
3350
  * Called when delete is requested.
3201
3351
  *
3202
3352
  * @param event - The event triggered this function.
3353
+ * @returns The result of the delete operation.
3203
3354
  */
3204
3355
  onDeleteSelectedItems(event: unknown): unknown;
3205
3356
  /**
@@ -5225,6 +5376,7 @@ export interface CapacitorAdapterFs {
5225
5376
  *
5226
5377
  * @param realPath - Real file system path.
5227
5378
  * @param data - Text data to append.
5379
+ * @returns A promise that resolves when the data is appended.
5228
5380
  */
5229
5381
  append(realPath: string, data: string): Promise<void>;
5230
5382
  /**
@@ -5232,12 +5384,14 @@ export interface CapacitorAdapterFs {
5232
5384
  *
5233
5385
  * @param realPath - Source file path.
5234
5386
  * @param newRealPath - Destination file path.
5387
+ * @returns A promise that resolves when the file is copied.
5235
5388
  */
5236
5389
  copy(realPath: string, newRealPath: string): Promise<void>;
5237
5390
  /**
5238
5391
  * Delete a file at the given path.
5239
5392
  *
5240
5393
  * @param realPath - File path to delete.
5394
+ * @returns A promise that resolves when the file is deleted.
5241
5395
  */
5242
5396
  delete(realPath: string): Promise<void>;
5243
5397
  /**
@@ -5261,18 +5415,24 @@ export interface CapacitorAdapterFs {
5261
5415
  * @returns URI string.
5262
5416
  */
5263
5417
  getUri(realPath: string): string;
5264
- /** Initialize the file system adapter. */
5418
+ /**
5419
+ * Initialize the file system adapter.
5420
+ *
5421
+ * @returns A promise that resolves when the adapter is initialized.
5422
+ */
5265
5423
  init(): Promise<void>;
5266
5424
  /**
5267
5425
  * Create a directory at the given path.
5268
5426
  *
5269
5427
  * @param realPath - Directory path to create.
5428
+ * @returns A promise that resolves when the directory is created.
5270
5429
  */
5271
5430
  mkdir(realPath: string): Promise<void>;
5272
5431
  /**
5273
5432
  * Open a file using the native platform handler.
5274
5433
  *
5275
5434
  * @param realPath - File path to open.
5435
+ * @returns A promise that resolves when the file is opened.
5276
5436
  */
5277
5437
  open(realPath: string): Promise<void>;
5278
5438
  /**
@@ -5301,12 +5461,14 @@ export interface CapacitorAdapterFs {
5301
5461
  *
5302
5462
  * @param realPath - Current file path.
5303
5463
  * @param newRealPath - New file path.
5464
+ * @returns A promise that resolves when the file is renamed.
5304
5465
  */
5305
5466
  rename(realPath: string, newRealPath: string): Promise<void>;
5306
5467
  /**
5307
5468
  * Remove a directory.
5308
5469
  *
5309
5470
  * @param realPath - Directory path to remove.
5471
+ * @returns A promise that resolves when the directory is removed.
5310
5472
  */
5311
5473
  rmdir(realPath: string): Promise<void>;
5312
5474
  /**
@@ -5315,6 +5477,7 @@ export interface CapacitorAdapterFs {
5315
5477
  * @param realPath - File path.
5316
5478
  * @param ctime - Creation time in milliseconds.
5317
5479
  * @param mtime - Modification time in milliseconds.
5480
+ * @returns A promise that resolves when the times are set.
5318
5481
  */
5319
5482
  setTimes(realPath: string, ctime: number, mtime: number): Promise<void>;
5320
5483
  /**
@@ -5328,18 +5491,21 @@ export interface CapacitorAdapterFs {
5328
5491
  * Move a file to the system trash.
5329
5492
  *
5330
5493
  * @param realPath - File path to trash.
5494
+ * @returns A promise that resolves when the file is trashed.
5331
5495
  */
5332
5496
  trash(realPath: string): Promise<void>;
5333
5497
  /**
5334
5498
  * Verify and download an iCloud file if it is not yet available locally.
5335
5499
  *
5336
5500
  * @param realPath - File path to verify.
5501
+ * @returns A promise that resolves when the iCloud file is verified.
5337
5502
  */
5338
5503
  verifyIcloud(realPath: string): Promise<void>;
5339
5504
  /**
5340
5505
  * Start watching a path for file system changes.
5341
5506
  *
5342
5507
  * @param realPath - Path to watch.
5508
+ * @returns A promise that resolves when the watcher is started.
5343
5509
  */
5344
5510
  watch(realPath: string): Promise<void>;
5345
5511
  /**
@@ -5354,6 +5520,7 @@ export interface CapacitorAdapterFs {
5354
5520
  *
5355
5521
  * @param realPath - File path to write to.
5356
5522
  * @param data - Text data to write.
5523
+ * @returns A promise that resolves when the file is written.
5357
5524
  */
5358
5525
  write(realPath: string, data: string): Promise<void>;
5359
5526
  /**
@@ -5361,6 +5528,7 @@ export interface CapacitorAdapterFs {
5361
5528
  *
5362
5529
  * @param realPath - File path to write to.
5363
5530
  * @param data - Binary data to write.
5531
+ * @returns A promise that resolves when the file is written.
5364
5532
  */
5365
5533
  writeBinary(realPath: string, data: ArrayBuffer): Promise<void>;
5366
5534
  /**
@@ -5368,6 +5536,7 @@ export interface CapacitorAdapterFs {
5368
5536
  *
5369
5537
  * @param realPath - File path to write to.
5370
5538
  * @param data - Binary data to write.
5539
+ * @returns A promise that resolves when the file is written.
5371
5540
  */
5372
5541
  writeBinaryInternal(realPath: string, data: ArrayBuffer): Promise<void>;
5373
5542
  }
@@ -5490,12 +5659,14 @@ export interface ClipboardManager {
5490
5659
  *
5491
5660
  * @param file - File to embed.
5492
5661
  * @param replace - Whether to replace the current selection.
5662
+ * @returns A promise that resolves when the embed is inserted.
5493
5663
  */
5494
5664
  insertAttachmentEmbed(file: TAbstractFile, replace: boolean): Promise<void>;
5495
5665
  /**
5496
5666
  * Insert files from drop-event into the editor.
5497
5667
  *
5498
5668
  * @param importedAttachments - Attachments to insert.
5669
+ * @returns A promise that resolves when all files are inserted.
5499
5670
  */
5500
5671
  insertFiles(importedAttachments: ImportedAttachment[]): Promise<void>;
5501
5672
  /**
@@ -5505,6 +5676,7 @@ export interface ClipboardManager {
5505
5676
  * @param extension - File extension.
5506
5677
  * @param data - Binary data of the attachment.
5507
5678
  * @param replace - Whether to replace the current selection.
5679
+ * @returns A promise that resolves when the attachment is saved.
5508
5680
  * @remark Invokes insertAttachmentEmbed.
5509
5681
  */
5510
5682
  saveAttachment(name: string, extension: string, data: ArrayBuffer, replace: boolean): Promise<void>;
@@ -6250,15 +6422,36 @@ export interface CommandPalettePluginInstance extends InternalPluginInstance<Com
6250
6422
  plugin: CommandPalettePlugin;
6251
6423
  /** List of recently used command IDs. */
6252
6424
  recentCommands: string[];
6253
- /** Get the list of available commands for the palette. */
6425
+ /**
6426
+ * Get the list of available commands for the palette.
6427
+ *
6428
+ * @returns The available commands.
6429
+ */
6254
6430
  getCommands(): Command[];
6255
- /** Handle external settings file changes and reload configuration. */
6431
+ /**
6432
+ * Handle external settings file changes and reload configuration.
6433
+ *
6434
+ * @returns A promise that resolves when the settings are reloaded.
6435
+ */
6256
6436
  onExternalSettingsChange(): Promise<void>;
6257
- /** Called when the command palette is opened. */
6437
+ /**
6438
+ * Called when the command palette is opened.
6439
+ *
6440
+ * @returns Whether the command palette was successfully opened.
6441
+ */
6258
6442
  onOpen(): boolean;
6259
- /** Callback invoked to open the command palette. */
6443
+ /**
6444
+ * Callback invoked to open the command palette.
6445
+ *
6446
+ * @returns Whether the callback was successfully executed.
6447
+ */
6260
6448
  openCallback(): boolean;
6261
- /** Save the command palette settings. */
6449
+ /**
6450
+ * Save the command palette settings.
6451
+ *
6452
+ * @param plugin - The command palette plugin to save settings for.
6453
+ * @unofficial
6454
+ */
6262
6455
  saveSettings(plugin: CommandPalettePlugin): void;
6263
6456
  }
6264
6457
  /**
@@ -6294,22 +6487,27 @@ export interface Commands {
6294
6487
  * Execute a command by reference.
6295
6488
  *
6296
6489
  * @param command - Command to execute.
6490
+ * @returns Whether the command was successfully executed.
6297
6491
  */
6298
6492
  executeCommand(command: Command): boolean;
6299
6493
  /**
6300
6494
  * Execute a command by ID.
6301
6495
  *
6302
6496
  * @param commandId - ID of command to execute.
6497
+ * @returns Whether the command was successfully executed.
6303
6498
  */
6304
6499
  executeCommandById(commandId: string): boolean;
6305
6500
  /**
6306
6501
  * Find a command by ID.
6307
6502
  *
6308
6503
  * @param commandId - ID of command to find.
6504
+ * @returns The command, or undefined if not found.
6309
6505
  */
6310
6506
  findCommand(commandId: string): Command | undefined;
6311
6507
  /**
6312
6508
  * Lists **all** commands, both with and without editor callback.
6509
+ *
6510
+ * @returns All registered commands.
6313
6511
  */
6314
6512
  listCommands(): Command[];
6315
6513
  /**
@@ -6349,7 +6547,12 @@ export interface ConcatFunction extends BasesFunction {
6349
6547
  * @unofficial
6350
6548
  */
6351
6549
  export interface ConstructorBase<Args extends unknown[], Instance> {
6352
- /** Construct a new instance with the given arguments. */
6550
+ /**
6551
+ * Construct a new instance with the given arguments.
6552
+ *
6553
+ * @param args - The constructor arguments.
6554
+ * @returns The constructed instance.
6555
+ */
6353
6556
  new (...args: Args): Instance;
6354
6557
  /** Prototype of the constructed instances. */
6355
6558
  prototype: Instance;
@@ -6607,6 +6810,7 @@ export interface CustomCSS extends Component {
6607
6810
  * dummy manifest for the theme.
6608
6811
  *
6609
6812
  * @param options - Options for installing the theme.
6813
+ * @returns A promise that resolves when the legacy theme is installed.
6610
6814
  * @remark Name will be used as the folder name for the theme.
6611
6815
  */
6612
6816
  installLegacyTheme(options: InstallThemeOptions): Promise<void>;
@@ -6615,6 +6819,7 @@ export interface CustomCSS extends Component {
6615
6819
  *
6616
6820
  * @param options - Options for installing the theme.
6617
6821
  * @param version - Version to install.
6822
+ * @returns A promise that resolves when the theme is installed.
6618
6823
  */
6619
6824
  installTheme(options: InstallThemeOptions, version: string): Promise<void>;
6620
6825
  /**
@@ -6624,13 +6829,29 @@ export interface CustomCSS extends Component {
6624
6829
  * @returns Whether the theme is installed.
6625
6830
  */
6626
6831
  isThemeInstalled(themeName: string): boolean;
6627
- /** Load and apply CSS from the given source. */
6832
+ /**
6833
+ * Load and apply CSS from the given source.
6834
+ *
6835
+ * @returns The result of loading CSS.
6836
+ */
6628
6837
  loadCss(arg1: unknown): Promise<unknown>;
6629
- /** Load stored CustomCSS configuration data. */
6838
+ /**
6839
+ * Load stored CustomCSS configuration data.
6840
+ *
6841
+ * @returns The loaded configuration data.
6842
+ */
6630
6843
  loadData(): unknown;
6631
- /** Load and apply all enabled CSS snippets. */
6844
+ /**
6845
+ * Load and apply all enabled CSS snippets.
6846
+ *
6847
+ * @returns The result of loading snippets.
6848
+ */
6632
6849
  loadSnippets(): unknown;
6633
- /** Load and apply a specific theme. */
6850
+ /**
6851
+ * Load and apply a specific theme.
6852
+ *
6853
+ * @returns The result of loading the theme.
6854
+ */
6634
6855
  loadTheme(arg1: unknown): unknown;
6635
6856
  /** Lifecycle hook called when the component is loaded. */
6636
6857
  onload(): void;
@@ -6648,6 +6869,7 @@ export interface CustomCSS extends Component {
6648
6869
  * Remove a theme by theme name.
6649
6870
  *
6650
6871
  * @param themeName - Name of the theme to remove.
6872
+ * @returns A promise that resolves when the theme is removed.
6651
6873
  */
6652
6874
  removeTheme(themeName: string): Promise<void>;
6653
6875
  /**
@@ -6746,12 +6968,14 @@ export interface DailyNotesPluginInstance extends InternalPluginInstance<DailyNo
6746
6968
  * Navigate to the next existing daily note after the given timestamp.
6747
6969
  *
6748
6970
  * @param timestamp - The reference timestamp.
6971
+ * @returns A promise that resolves when navigation is complete.
6749
6972
  */
6750
6973
  gotoNextExisting(timestamp: number): Promise<void>;
6751
6974
  /**
6752
6975
  * Navigate to the previous existing daily note before the given timestamp.
6753
6976
  *
6754
6977
  * @param timestamp - The reference timestamp.
6978
+ * @returns A promise that resolves when navigation is complete.
6755
6979
  */
6756
6980
  gotoPreviousExisting(timestamp: number): Promise<void>;
6757
6981
  /**
@@ -6760,12 +6984,17 @@ export interface DailyNotesPluginInstance extends InternalPluginInstance<DailyNo
6760
6984
  * @param callback - The callback to invoke for each daily note.
6761
6985
  */
6762
6986
  iterateDailyNotes(callback: (file: TFile, timestamp: number) => void): void;
6763
- /** Handle external settings file changes and reload configuration. */
6987
+ /**
6988
+ * Handle external settings file changes and reload configuration.
6989
+ *
6990
+ * @returns A promise that resolves when the settings are reloaded.
6991
+ */
6764
6992
  onExternalSettingsChange(): Promise<void>;
6765
6993
  /**
6766
6994
  * Handle the open daily note command event.
6767
6995
  *
6768
6996
  * @param evt - The triggering event.
6997
+ * @returns A promise that resolves when the daily note is opened.
6769
6998
  */
6770
6999
  onOpenDailyNote(evt: Event): Promise<void>;
6771
7000
  }
@@ -7023,7 +7252,7 @@ export interface DomEventsHandlers {
7023
7252
  *
7024
7253
  * @param evt - The mouse event.
7025
7254
  * @param targetEl - The target element.
7026
- * @param linkText - The link text.
7255
+ * @param tag - The tag text.
7027
7256
  * @returns The result of handling the tag click.
7028
7257
  */
7029
7258
  onTagClick(evt: MouseEvent, targetEl: HTMLElement, tag: string): unknown;
@@ -8016,14 +8245,20 @@ export interface EmbeddedEditorView extends Component {
8016
8245
  useIframe: boolean;
8017
8246
  /**
8018
8247
  * Get the preview editor, if exists.
8248
+ *
8249
+ * @returns The iframed markdown editor, or null.
8019
8250
  */
8020
8251
  get editor(): IFramedMarkdownEditor | null;
8021
8252
  /**
8022
8253
  * Get the path to the file, if any file registered.
8254
+ *
8255
+ * @returns The file path.
8023
8256
  */
8024
8257
  get path(): string;
8025
8258
  /**
8026
8259
  * Get the scroll of the file renderer component.
8260
+ *
8261
+ * @returns The scroll position.
8027
8262
  */
8028
8263
  get scroll(): unknown;
8029
8264
  /**
@@ -8258,6 +8493,9 @@ export interface FileExplorerPlugin extends InternalPlugin<FileExplorerPluginIns
8258
8493
  /**
8259
8494
  * Reveals a file or folder in the file explorer view, opens the view if it is not already.
8260
8495
  * open/visible.
8496
+ *
8497
+ * @param item - The file or folder to reveal.
8498
+ * @unofficial
8261
8499
  */
8262
8500
  revealInFolder(item: TFile | TFolder): void;
8263
8501
  }
@@ -8276,6 +8514,9 @@ export interface FileExplorerPluginInstance extends InternalPluginInstance<FileE
8276
8514
  /**
8277
8515
  * Reveals a file or folder in the file explorer view, opens the view if it is not already.
8278
8516
  * open/visible.
8517
+ *
8518
+ * @param item - The file or folder to reveal.
8519
+ * @unofficial
8279
8520
  */
8280
8521
  revealInFolder(item: TFile | TFolder): void;
8281
8522
  }
@@ -8319,6 +8560,8 @@ export interface FileExplorerView extends View {
8319
8560
  tree: Tree<FileTreeItem | FolderTreeItem>;
8320
8561
  /**
8321
8562
  * Try to rename the file.
8563
+ *
8564
+ * @returns A promise that resolves when the rename is accepted.
8322
8565
  */
8323
8566
  acceptRename(): Promise<void>;
8324
8567
  /**
@@ -8326,6 +8569,7 @@ export interface FileExplorerView extends View {
8326
8569
  *
8327
8570
  * @param file - The created file.
8328
8571
  * @param newLeaf - Where to open the view for this file.
8572
+ * @returns A promise that resolves when the file is opened and/or rename is started.
8329
8573
  */
8330
8574
  afterCreate(file: TFile, newLeaf: PaneType | boolean): Promise<void>;
8331
8575
  /**
@@ -8347,6 +8591,7 @@ export interface FileExplorerView extends View {
8347
8591
  * @param type - The type of file to create.
8348
8592
  * @param location - The location where to create the file.
8349
8593
  * @param newLeaf - Where to open the view for this file.
8594
+ * @returns A promise that resolves when the file or folder is created.
8350
8595
  */
8351
8596
  createAbstractFile(type: "file" | "folder", location: TFolder, newLeaf: PaneType | boolean): Promise<void>;
8352
8597
  /**
@@ -8398,6 +8643,8 @@ export interface FileExplorerView extends View {
8398
8643
  getSortedFolderItems(folder: TFolder): FileTreeItem[];
8399
8644
  /**
8400
8645
  * Get the current view type.
8646
+ *
8647
+ * @returns The file explorer view type.
8401
8648
  */
8402
8649
  getViewType(): typeof ViewType.FileExplorer;
8403
8650
  /**
@@ -8417,12 +8664,14 @@ export interface FileExplorerView extends View {
8417
8664
  * Is called when on the new folder icon is clicked. Call createAbstractFile().
8418
8665
  *
8419
8666
  * @param event - The MouseEvent which triggered this function.
8667
+ * @returns A promise that resolves when the folder is created.
8420
8668
  */
8421
8669
  onCreateNewFolderClick(event: MouseEvent): Promise<void>;
8422
8670
  /**
8423
8671
  * Is called when on the new note icon is clicked. Call createAbstractFile().
8424
8672
  *
8425
8673
  * @param event - The MouseEvent which triggered this function.
8674
+ * @returns A promise that resolves when the note is created.
8426
8675
  */
8427
8676
  onCreateNewNoteClick(event: MouseEvent): Promise<void>;
8428
8677
  /**
@@ -8435,6 +8684,7 @@ export interface FileExplorerView extends View {
8435
8684
  * Called when delete is requested.
8436
8685
  *
8437
8686
  * @param event - The event triggered this function.
8687
+ * @returns The result of the delete operation.
8438
8688
  */
8439
8689
  onDeleteSelectedFiles(event: unknown): unknown;
8440
8690
  /**
@@ -8570,12 +8820,15 @@ export interface FilePropertiesView extends InfoFileView {
8570
8820
  getFile(): TFile;
8571
8821
  /**
8572
8822
  * Get the current view type.
8823
+ *
8824
+ * @returns The file properties view type.
8573
8825
  */
8574
8826
  getViewType(): typeof ViewType.FileProperties;
8575
8827
  /**
8576
8828
  * Checks the file is an markdown file.
8577
8829
  *
8578
8830
  * @param file - The file to check.
8831
+ * @returns Whether the file is a supported markdown file.
8579
8832
  */
8580
8833
  isSupportedFile(file: TFile): boolean;
8581
8834
  /**
@@ -8596,6 +8849,7 @@ export interface FilePropertiesView extends InfoFileView {
8596
8849
  * Reads the file if it is supported.
8597
8850
  *
8598
8851
  * @param file - The file to read.
8852
+ * @returns A promise that resolves with the file contents.
8599
8853
  */
8600
8854
  readSupportedFile(file: TFile): Promise<unknown>;
8601
8855
  /**
@@ -8794,10 +9048,10 @@ export interface FileSuggestManager {
8794
9048
  * @param block - Block cache entry to match against.
8795
9049
  * @param sourcePath - Source path for link resolution.
8796
9050
  * @param content - Content of the block.
8797
- * @param text_parts - Search fragments to match.
9051
+ * @param textParts - Search fragments to match.
8798
9052
  * @returns Search result if matched, or null.
8799
9053
  */
8800
- matchBlock(path: string, file: TFile, block: BlockCache, sourcePath: null | string, content: string, text_parts: string[]): SearchResult | null;
9054
+ matchBlock(path: string, file: TFile, block: BlockCache, sourcePath: null | string, content: string, textParts: string[]): SearchResult | null;
8801
9055
  }
8802
9056
  /**
8803
9057
  * File suggestion.
@@ -8840,7 +9094,11 @@ export interface FileTreeItem extends AbstractFileTreeItem<TFile> {
8840
9094
  * if it wasn't a Markdown file.
8841
9095
  */
8842
9096
  tagEl: HTMLElement | null;
8843
- /** Check whether the file type is supported for opening. */
9097
+ /**
9098
+ * Check whether the file type is supported for opening.
9099
+ *
9100
+ * @returns Whether the file type is supported.
9101
+ */
8844
9102
  isSupported(): boolean;
8845
9103
  }
8846
9104
  /**
@@ -9432,7 +9690,11 @@ export interface GraphPluginInstance extends InternalPluginInstance<GraphPlugin>
9432
9690
  options: GraphPluginInstanceOptions;
9433
9691
  /** Reference to the parent graph plugin. */
9434
9692
  plugin: GraphPlugin;
9435
- /** Reload options when settings are changed externally. */
9693
+ /**
9694
+ * Reload options when settings are changed externally.
9695
+ *
9696
+ * @returns A promise that resolves when the settings are reloaded.
9697
+ */
9436
9698
  onExternalSettingsChange(): Promise<void>;
9437
9699
  /**
9438
9700
  * Add graph-related items to the file context menu.
@@ -9819,6 +10081,10 @@ export interface HardWrapOptions {
9819
10081
  export interface HasCompare {
9820
10082
  /**
9821
10083
  * Compares two values.
10084
+ *
10085
+ * @param a - The first value to compare.
10086
+ * @param b - The second value to compare.
10087
+ * @returns Whether the comparison is satisfied.
9822
10088
  */
9823
10089
  compare(a: unknown, b: unknown): boolean;
9824
10090
  }
@@ -9831,6 +10097,9 @@ export interface HasCompare {
9831
10097
  export interface HasExtract {
9832
10098
  /**
9833
10099
  * Extracts a date.
10100
+ *
10101
+ * @param date - The date to extract from.
10102
+ * @returns The extracted numeric value.
9834
10103
  */
9835
10104
  extract(date: Date): number;
9836
10105
  }
@@ -9843,6 +10112,9 @@ export interface HasExtract {
9843
10112
  export interface HasGetDisplayName {
9844
10113
  /**
9845
10114
  * Gets the display name.
10115
+ *
10116
+ * @param type - The type to get the display name for.
10117
+ * @returns The display name.
9846
10118
  */
9847
10119
  getDisplayName(type: string): string;
9848
10120
  }
@@ -9855,6 +10127,9 @@ export interface HasGetDisplayName {
9855
10127
  export interface HasGetRHSWidgetType {
9856
10128
  /**
9857
10129
  * Gets the RHS widget type.
10130
+ *
10131
+ * @param type - The type to get the RHS widget type for.
10132
+ * @returns The RHS widget type.
9858
10133
  */
9859
10134
  getRHSWidgetType(type: string): string;
9860
10135
  }
@@ -9870,9 +10145,17 @@ export interface HeaderDom {
9870
10145
  navButtonsEl: HTMLDivElement;
9871
10146
  /** Container element for the navigation header. */
9872
10147
  navHeaderEl: HTMLDivElement;
9873
- /** Add a navigation button to the header. */
10148
+ /**
10149
+ * Add a navigation button to the header.
10150
+ *
10151
+ * @returns The created navigation button element.
10152
+ */
9874
10153
  addNavButton(arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown): unknown;
9875
- /** Add a sort button to the header. */
10154
+ /**
10155
+ * Add a sort button to the header.
10156
+ *
10157
+ * @returns The created sort button element.
10158
+ */
9876
10159
  addSortButton(arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown): unknown;
9877
10160
  }
9878
10161
  /**
@@ -9936,31 +10219,39 @@ export interface HotkeyManager {
9936
10219
  * Get hotkey associated with command ID.
9937
10220
  *
9938
10221
  * @param command - Command ID to get hotkey for.
10222
+ * @returns The default hotkeys for the command.
9939
10223
  */
9940
10224
  getDefaultHotkeys(command: string): KeymapInfo[];
9941
10225
  /**
9942
10226
  * Get hotkey associated with command ID.
9943
10227
  *
9944
10228
  * @param command - Command ID to get hotkey for.
10229
+ * @returns The hotkeys for the command.
9945
10230
  */
9946
10231
  getHotkeys(command: string): KeymapInfo[];
9947
10232
  /**
9948
10233
  * Load hotkeys from storage.
9949
10234
  */
9950
10235
  load(): void;
9951
- /** Handle raw file system change events for the hotkey config. */
10236
+ /**
10237
+ * Handle raw file system change events for the hotkey config.
10238
+ *
10239
+ * @param e - The file system change event.
10240
+ */
9952
10241
  onRaw(e: unknown): void;
9953
10242
  /**
9954
10243
  * Trigger a command by keyboard event.
9955
10244
  *
9956
10245
  * @param event - Keyboard event to trigger command with.
9957
10246
  * @param keypress - Pressed key information.
10247
+ * @returns Whether a command was triggered.
9958
10248
  */
9959
10249
  onTrigger(event: KeyboardEvent, keypress: KeymapInfo): boolean;
9960
10250
  /**
9961
10251
  * Pretty-print hotkey of a command.
9962
10252
  *
9963
10253
  * @param commandId - Command ID to print hotkey for.
10254
+ * @returns The formatted hotkey string.
9964
10255
  */
9965
10256
  printHotkeyForCommand(commandId: string): string;
9966
10257
  /** Register event listeners for hotkey config file changes. */
@@ -10367,7 +10658,11 @@ export interface InternalPlugin<InternalPluginInstance> extends Component {
10367
10658
  * @param settingTab - The settings tab to add.
10368
10659
  */
10369
10660
  addSettingTab(settingTab: PluginSettingTab): void;
10370
- /** Delete persisted data for this plugin. */
10661
+ /**
10662
+ * Delete persisted data for this plugin.
10663
+ *
10664
+ * @returns A promise that resolves when the data is deleted.
10665
+ */
10371
10666
  deleteData(): Promise<void>;
10372
10667
  /**
10373
10668
  * Disable this plugin.
@@ -10379,6 +10674,7 @@ export interface InternalPlugin<InternalPluginInstance> extends Component {
10379
10674
  * Enable this plugin.
10380
10675
  *
10381
10676
  * @param isEnabledByUser - Whether the user manually enabled the plugin.
10677
+ * @returns A promise that resolves when the plugin is enabled.
10382
10678
  */
10383
10679
  enable(isEnabledByUser?: boolean): Promise<void>;
10384
10680
  /**
@@ -10387,7 +10683,11 @@ export interface InternalPlugin<InternalPluginInstance> extends Component {
10387
10683
  * @returns The modification timestamp, or undefined.
10388
10684
  */
10389
10685
  getModifiedTime(): Promise<number | undefined>;
10390
- /** Handle changes to the plugin config file. */
10686
+ /**
10687
+ * Handle changes to the plugin config file.
10688
+ *
10689
+ * @returns A promise that resolves when the config change is processed.
10690
+ */
10391
10691
  handleConfigFileChange(): Promise<void>;
10392
10692
  /** Initialize this plugin. */
10393
10693
  init(): void;
@@ -10430,6 +10730,7 @@ export interface InternalPlugin<InternalPluginInstance> extends Component {
10430
10730
  * Save data for this plugin.
10431
10731
  *
10432
10732
  * @param data - The data object to persist.
10733
+ * @returns A promise that resolves when the data is saved.
10433
10734
  */
10434
10735
  saveData(data: object): Promise<void>;
10435
10736
  }
@@ -10521,6 +10822,8 @@ export interface InternalPlugins extends Events {
10521
10822
  ], Promise<void>>;
10522
10823
  /**
10523
10824
  * - Load plugin configs and enable plugins.
10825
+ *
10826
+ * @returns A promise that resolves when all plugins are enabled.
10524
10827
  */
10525
10828
  enable(): Promise<void>;
10526
10829
  /**
@@ -10558,6 +10861,8 @@ export interface InternalPlugins extends Events {
10558
10861
  onRaw(configPath: string): void;
10559
10862
  /**
10560
10863
  * - Save current plugin configs.
10864
+ *
10865
+ * @returns A promise that resolves when the config is saved.
10561
10866
  */
10562
10867
  saveConfig(): Promise<void>;
10563
10868
  }
@@ -10750,7 +11055,12 @@ export interface LanguageState {
10750
11055
  * The current tree. Immutable, because directly accessible from the editor state.
10751
11056
  */
10752
11057
  tree: LezerTree;
10753
- /** Apply a transaction to produce an updated language state. */
11058
+ /**
11059
+ * Apply a transaction to produce an updated language state.
11060
+ *
11061
+ * @param tr - The transaction to apply.
11062
+ * @returns The updated language state.
11063
+ */
10754
11064
  apply(tr: Transaction): LanguageState;
10755
11065
  }
10756
11066
  /**
@@ -10871,6 +11181,7 @@ export interface LinkUpdater {
10871
11181
  *
10872
11182
  * @param file - File to update.
10873
11183
  * @param updates - Link change updates to apply.
11184
+ * @returns A promise that resolves when the updates have been applied.
10874
11185
  */
10875
11186
  applyUpdates(file: TFile, updates: LinkChangeUpdate[]): Promise<void>;
10876
11187
  /**
@@ -10892,6 +11203,7 @@ export interface LinkUpdater {
10892
11203
  * @param file - File containing the subpath.
10893
11204
  * @param oldSubpath - Previous subpath.
10894
11205
  * @param newSubpath - New subpath.
11206
+ * @returns A promise that resolves when the subpath has been renamed.
10895
11207
  */
10896
11208
  renameSubpath(file: TFile, oldSubpath: string, newSubpath: string): Promise<void>;
10897
11209
  }
@@ -11076,14 +11388,20 @@ export interface MarkdownBaseView extends Component {
11076
11388
  tableCell: null | TableCellEditor;
11077
11389
  /**
11078
11390
  * Currently active CM instance (table cell CM or main CM).
11391
+ *
11392
+ * @returns The active CodeMirror editor view.
11079
11393
  */
11080
11394
  get activeCM(): EditorView;
11081
11395
  /**
11082
11396
  * Returns attached file of the owner instance.
11397
+ *
11398
+ * @returns The attached file, or null.
11083
11399
  */
11084
11400
  get file(): TFile | null;
11085
11401
  /**
11086
11402
  * Returns path of the attached file.
11403
+ *
11404
+ * @returns The file path.
11087
11405
  */
11088
11406
  get path(): string;
11089
11407
  /**
@@ -11117,10 +11435,10 @@ export interface MarkdownBaseView extends Component {
11117
11435
  * Edit a specified table cell, creating a table cell editor.
11118
11436
  *
11119
11437
  * @param cell - Table editor owning the cell.
11120
- * @param new_cell - Table cell to edit.
11438
+ * @param newCell - Table cell to edit.
11121
11439
  * @returns The created table cell editor.
11122
11440
  */
11123
- editTableCell(cell: TableEditor, new_cell: TableCell): TableCellEditor;
11441
+ editTableCell(cell: TableEditor, newCell: TableCell): TableCellEditor;
11124
11442
  /**
11125
11443
  * Get the current editor document as a string.
11126
11444
  *
@@ -11141,7 +11459,7 @@ export interface MarkdownBaseView extends Component {
11141
11459
  */
11142
11460
  getFoldInfo(): null | FoldInfo;
11143
11461
  /**
11144
- * Builds all local extensions and assigns to this.localExtensions.
11462
+ * Builds all local extensions and assigns to `this.localExtensions`.
11145
11463
  *
11146
11464
  * @returns The local extensions.
11147
11465
  * @remark Will build extensions if they were not already built.
@@ -11152,6 +11470,7 @@ export interface MarkdownBaseView extends Component {
11152
11470
  *
11153
11471
  * @param event - The pointer event.
11154
11472
  * @param x - Whether the context menu was triggered by keyboard.
11473
+ * @returns A promise that resolves when the context menu is handled.
11155
11474
  */
11156
11475
  onContextMenu(event: PointerEvent, x: boolean): Promise<void>;
11157
11476
  /**
@@ -11200,9 +11519,9 @@ export interface MarkdownBaseView extends Component {
11200
11519
  /**
11201
11520
  * Move the editor into the new container.
11202
11521
  *
11203
- * @param new_container - New container element for the editor.
11522
+ * @param newContainer - New container element for the editor.
11204
11523
  */
11205
- reparent(new_container: HTMLElement): void;
11524
+ reparent(newContainer: HTMLElement): void;
11206
11525
  /**
11207
11526
  * Bodge to reset the syntax highlighting.
11208
11527
  *
@@ -11232,9 +11551,9 @@ export interface MarkdownBaseView extends Component {
11232
11551
  * Execute functionality of token (open external link, open internal link in leaf, ...).
11233
11552
  *
11234
11553
  * @param token - The clickable token.
11235
- * @param new_leaf - Whether to open in a new leaf.
11554
+ * @param newLeaf - Whether to open in a new leaf.
11236
11555
  */
11237
- triggerClickableToken(token: Token, new_leaf: boolean): void;
11556
+ triggerClickableToken(token: Token, newLeaf: boolean): void;
11238
11557
  /**
11239
11558
  * Callback for onUpdate functionality added as an extension.
11240
11559
  *
@@ -11496,11 +11815,24 @@ export interface MathJax {
11496
11815
  tex2mmlPromise(math: string, options?: Record<string, unknown>): Promise<string>;
11497
11816
  /** Reset the TeX input jax, clearing equation numbering and labels. */
11498
11817
  texReset(): void;
11499
- /** Typeset math expressions in the given elements synchronously. */
11818
+ /**
11819
+ * Typeset math expressions in the given elements synchronously.
11820
+ *
11821
+ * @param elements - The elements to typeset.
11822
+ */
11500
11823
  typeset(elements?: unknown[] | null): void;
11501
- /** Clear typeset math from the given elements. */
11824
+ /**
11825
+ * Clear typeset math from the given elements.
11826
+ *
11827
+ * @param elements - The elements to clear.
11828
+ */
11502
11829
  typesetClear(elements?: unknown[] | null): void;
11503
- /** Typeset math expressions in the given elements asynchronously. */
11830
+ /**
11831
+ * Typeset math expressions in the given elements asynchronously.
11832
+ *
11833
+ * @param elements - The elements to typeset.
11834
+ * @returns A promise that resolves when typesetting is complete.
11835
+ */
11504
11836
  typesetPromise(elements?: unknown[] | null): Promise<void>;
11505
11837
  }
11506
11838
  /**
@@ -11703,10 +12035,10 @@ export interface MetadataEditor extends Component {
11703
12035
  * Remove specified properties from the metadata editor and save, and reset focus if specified.
11704
12036
  *
11705
12037
  * @param properties - Properties to remove.
11706
- * @param reset_focus - Whether to reset focus after removal.
12038
+ * @param resetFocus - Whether to reset focus after removal.
11707
12039
  * @returns The result of the removal operation.
11708
12040
  */
11709
- removeProperties(properties: MetadataEditorProperty[], reset_focus?: boolean): unknown;
12041
+ removeProperties(properties: MetadataEditorProperty[], resetFocus?: boolean): unknown;
11710
12042
  /**
11711
12043
  * Reorder the entry to specified index position and save.
11712
12044
  *
@@ -11855,10 +12187,10 @@ export interface MetadataEditorProperty extends Component {
11855
12187
  * Render property widget based on type.
11856
12188
  *
11857
12189
  * @param entry - Property entry data.
11858
- * @param check_errors - Whether to check for errors.
11859
- * @param use_expected_type - Whether to use the expected type.
12190
+ * @param checkErrors - Whether to check for errors.
12191
+ * @param useExpectedType - Whether to use the expected type.
11860
12192
  */
11861
- renderProperty(entry: PropertyEntryData<unknown>, check_errors?: boolean, use_expected_type?: boolean): void;
12193
+ renderProperty(entry: PropertyEntryData<unknown>, checkErrors?: boolean, useExpectedType?: boolean): void;
11862
12194
  /**
11863
12195
  * Set the selected class of property.
11864
12196
  *
@@ -11938,14 +12270,23 @@ export interface MetadataTypeManager extends Events {
11938
12270
  getWidget(type: string): PropertyWidget;
11939
12271
  /**
11940
12272
  * Load property types from config.
12273
+ *
12274
+ * @returns A promise that resolves when the property types are loaded.
11941
12275
  */
11942
12276
  loadData(): Promise<void>;
11943
- /** Handle raw file system change events for the property type config. */
12277
+ /**
12278
+ * Handle raw file system change events for the property type config.
12279
+ *
12280
+ * @param e - The raw file system change event.
12281
+ * @unofficial
12282
+ */
11944
12283
  onRaw(e: unknown): void;
11945
12284
  /** Register event listeners for property type config file changes. */
11946
12285
  registerListeners(): void;
11947
12286
  /**
11948
12287
  * Save property types to config.
12288
+ *
12289
+ * @returns A promise that resolves when the property types are saved.
11949
12290
  */
11950
12291
  save(): Promise<void>;
11951
12292
  /**
@@ -11953,12 +12294,14 @@ export interface MetadataTypeManager extends Events {
11953
12294
  *
11954
12295
  * @param property - Property name.
11955
12296
  * @param type - Widget type to assign.
12297
+ * @returns A promise that resolves when the widget type is set.
11956
12298
  */
11957
12299
  setType(property: string, type: PropertyWidgetType): Promise<void>;
11958
12300
  /**
11959
12301
  * Unset widget type for property.
11960
12302
  *
11961
12303
  * @param property - Property name.
12304
+ * @returns A promise that resolves when the widget type is unset.
11962
12305
  */
11963
12306
  unsetType(property: string): Promise<void>;
11964
12307
  /**
@@ -12082,9 +12425,17 @@ export interface MobileTabSwitcher {
12082
12425
  onLayoutChange(): void;
12083
12426
  /** Render the tab switcher content. */
12084
12427
  render(): void;
12085
- /** Set up the directory for caching tab preview images. */
12428
+ /**
12429
+ * Set up the directory for caching tab preview images.
12430
+ *
12431
+ * @returns A promise that resolves when the cache directory has been set up.
12432
+ */
12086
12433
  setupCacheDir(): Promise<void>;
12087
- /** Show the tab switcher UI. */
12434
+ /**
12435
+ * Show the tab switcher UI.
12436
+ *
12437
+ * @returns A promise that resolves when the tab switcher is shown.
12438
+ */
12088
12439
  show(): Promise<void>;
12089
12440
  /**
12090
12441
  * Display the tab management context menu.
@@ -12131,7 +12482,11 @@ export interface Multiselect {
12131
12482
  * @returns the created element or `null` if the value is not valid.
12132
12483
  */
12133
12484
  _createElement(value: string): string | null;
12134
- /** Create a new input element for the multiselect. */
12485
+ /**
12486
+ * Create a new input element for the multiselect.
12487
+ *
12488
+ * @returns The created input element.
12489
+ */
12135
12490
  _createInputEl(): HTMLDivElement;
12136
12491
  /**
12137
12492
  * Add a new element to the multiselect.
@@ -12206,6 +12561,7 @@ export interface Multiselect {
12206
12561
  * Remove an element of the multiselect.
12207
12562
  *
12208
12563
  * @param index - the index of the element.
12564
+ * @param shouldFocus - Whether to focus the next element after removal.
12209
12565
  */
12210
12566
  removeElement(index: number, shouldFocus?: boolean): void;
12211
12567
  /** Render the values of the multiselect. */
@@ -12403,7 +12759,11 @@ export interface NoteComposerPluginInstance extends InternalPluginInstance<NoteC
12403
12759
  * @param info - The active markdown view or file info.
12404
12760
  */
12405
12761
  onEditorMenu(menu: Menu, editor: Editor, info: MarkdownView | MarkdownFileInfo): void;
12406
- /** Handle external settings file changes and reload configuration. */
12762
+ /**
12763
+ * Handle external settings file changes and reload configuration.
12764
+ *
12765
+ * @returns A promise that resolves when the settings are reloaded.
12766
+ */
12407
12767
  onExternalSettingsChange(): Promise<void>;
12408
12768
  /**
12409
12769
  * Add note composer items to a file context menu.
@@ -12619,6 +12979,8 @@ export interface OutgoingLinkPluginInstance extends InternalPluginInstance<Outgo
12619
12979
  export interface OutgoingLinkView extends InfoFileView {
12620
12980
  /**
12621
12981
  * Get the current view type.
12982
+ *
12983
+ * @returns The outgoing link view type.
12622
12984
  */
12623
12985
  getViewType(): typeof ViewType.OutgoingLink;
12624
12986
  /** Refresh the outgoing links list. */
@@ -12693,6 +13055,8 @@ export interface OutlineView extends InfoFileView {
12693
13055
  getOwner(): View | null;
12694
13056
  /**
12695
13057
  * Get the current view type.
13058
+ *
13059
+ * @returns The outline view type.
12696
13060
  */
12697
13061
  getViewType(): typeof ViewType.Outline;
12698
13062
  /**
@@ -13020,34 +13384,42 @@ export interface Plugins {
13020
13384
  updates: Map<string, PluginUpdateManifest>;
13021
13385
  /**
13022
13386
  * Check online list for deprecated plugins to automatically disable.
13387
+ *
13388
+ * @returns A promise that resolves when the deprecation check is complete.
13023
13389
  */
13024
13390
  checkForDeprecations(): Promise<void>;
13025
13391
  /**
13026
13392
  * Check for plugin updates.
13393
+ *
13394
+ * @returns A promise that resolves when the update check is complete.
13027
13395
  */
13028
13396
  checkForUpdates(): Promise<void>;
13029
13397
  /**
13030
13398
  * Unload a plugin by ID.
13031
13399
  *
13032
13400
  * @param id - Plugin ID.
13401
+ * @returns A promise that resolves when the plugin is disabled.
13033
13402
  */
13034
13403
  disablePlugin(id: string): Promise<void>;
13035
13404
  /**
13036
13405
  * Unload a plugin by ID and save config for persistence.
13037
13406
  *
13038
13407
  * @param id - Plugin ID.
13408
+ * @returns A promise that resolves when the plugin is disabled and the config is saved.
13039
13409
  */
13040
13410
  disablePluginAndSave(id: string): Promise<void>;
13041
13411
  /**
13042
13412
  * Enable a plugin by ID.
13043
13413
  *
13044
13414
  * @param id - Plugin ID.
13415
+ * @returns A promise that resolves when the plugin is enabled.
13045
13416
  */
13046
13417
  enablePlugin(id: string): Promise<void>;
13047
13418
  /**
13048
13419
  * Enable a plugin by ID and save config for persistence.
13049
13420
  *
13050
13421
  * @param id - Plugin ID.
13422
+ * @returns A promise that resolves when the plugin is enabled and the config is saved.
13051
13423
  */
13052
13424
  enablePluginAndSave(id: string): Promise<void>;
13053
13425
  /**
@@ -13065,6 +13437,8 @@ export interface Plugins {
13065
13437
  getPluginFolder(): string;
13066
13438
  /**
13067
13439
  * Load plugin manifests and enable plugins from config.
13440
+ *
13441
+ * @returns A promise that resolves when initialization is complete.
13068
13442
  */
13069
13443
  initialize(): Promise<void>;
13070
13444
  /**
@@ -13073,6 +13447,7 @@ export interface Plugins {
13073
13447
  * @param repo - Repository identifier.
13074
13448
  * @param version - Version to install.
13075
13449
  * @param manifest - Plugin manifest data.
13450
+ * @returns A promise that resolves when the plugin is installed.
13076
13451
  */
13077
13452
  installPlugin(repo: string, version: string, manifest: PluginManifest): Promise<void>;
13078
13453
  /**
@@ -13092,10 +13467,13 @@ export interface Plugins {
13092
13467
  * Load a specific plugin's manifest by its folder path.
13093
13468
  *
13094
13469
  * @param path - Folder path containing the manifest.
13470
+ * @returns A promise that resolves when the manifest is loaded.
13095
13471
  */
13096
13472
  loadManifest(path: string): Promise<void>;
13097
13473
  /**
13098
13474
  * Load all plugin manifests from plugin folder.
13475
+ *
13476
+ * @returns A promise that resolves when all manifests are loaded.
13099
13477
  */
13100
13478
  loadManifests(): Promise<void>;
13101
13479
  /**
@@ -13105,28 +13483,38 @@ export interface Plugins {
13105
13483
  * @returns The loaded plugin instance.
13106
13484
  */
13107
13485
  loadPlugin(id: string): Promise<Plugin>;
13108
- /** Handle raw file system change events for plugin config files. */
13486
+ /**
13487
+ * Handle raw file system change events for plugin config files.
13488
+ *
13489
+ * @param e - The raw file system change event.
13490
+ * @unofficial
13491
+ */
13109
13492
  onRaw(e: unknown): void;
13110
13493
  /**
13111
13494
  * - Save current plugin configs.
13495
+ *
13496
+ * @returns A promise that resolves when the config is saved.
13112
13497
  */
13113
13498
  saveConfig(): Promise<void>;
13114
13499
  /**
13115
13500
  * Toggle whether community plugins are enabled.
13116
13501
  *
13117
13502
  * @param enabled - Whether to enable community plugins.
13503
+ * @returns A promise that resolves when the setting is applied.
13118
13504
  */
13119
13505
  setEnable(enabled: boolean): Promise<void>;
13120
13506
  /**
13121
13507
  * Uninstall a plugin by ID.
13122
13508
  *
13123
13509
  * @param id - Plugin ID.
13510
+ * @returns A promise that resolves when the plugin is uninstalled.
13124
13511
  */
13125
13512
  uninstallPlugin(id: string): Promise<void>;
13126
13513
  /**
13127
13514
  * Unload a plugin by ID.
13128
13515
  *
13129
13516
  * @param id - Plugin ID.
13517
+ * @returns A promise that resolves when the plugin is unloaded.
13130
13518
  */
13131
13519
  unloadPlugin(id: string): Promise<void>;
13132
13520
  }
@@ -13312,14 +13700,25 @@ export interface PropertyPropertyWidgetComponentComboBox extends PopoverSuggest<
13312
13700
  _onOpen?(): void;
13313
13701
  /** Attach the DOM of the combobox. */
13314
13702
  attachDom(): void;
13315
- /** Detach the DOM of the combobox. */
13703
+ /**
13704
+ * Detach the DOM of the combobox.
13705
+ *
13706
+ * @returns A promise that resolves when the DOM is detached.
13707
+ */
13316
13708
  detachDom(): Promise<void>;
13317
13709
  /** Focus the combobox. */
13318
13710
  focus(): void;
13319
- /** Get the items of the combobox. */
13711
+ /**
13712
+ * Get the items of the combobox.
13713
+ *
13714
+ * @returns The combobox items.
13715
+ */
13320
13716
  getItems(): PropertyPropertyWidgetComponentComboBoxItem[];
13321
13717
  /**
13322
13718
  * Callback for `getSuggestions`.
13719
+ *
13720
+ * @param query - The search query string.
13721
+ * @returns The matching search results.
13323
13722
  */
13324
13723
  getSuggestions(query: string): SearchResult[];
13325
13724
  /**
@@ -13389,7 +13788,11 @@ export interface PropertyPropertyWidgetComponentComboBox extends PopoverSuggest<
13389
13788
  * @returns the combobox.
13390
13789
  */
13391
13790
  setValueById(id: string): this;
13392
- /** Toggle the combobox. */
13791
+ /**
13792
+ * Toggle the combobox.
13793
+ *
13794
+ * @returns The result of toggling the combobox.
13795
+ */
13393
13796
  toggle(): unknown;
13394
13797
  /**
13395
13798
  * Update the value of the combobox.
@@ -13859,7 +14262,11 @@ export interface ResultDom {
13859
14262
  * @returns The result of stopping the loader.
13860
14263
  */
13861
14264
  stopLoader(): unknown;
13862
- /** Toggle the collapsed state of a result item. */
14265
+ /**
14266
+ * Toggle the collapsed state of a result item.
14267
+ *
14268
+ * @returns The result of toggling the collapse state.
14269
+ */
13863
14270
  toggle(arg1: unknown, arg2: unknown): Promise<unknown>;
13864
14271
  }
13865
14272
  /**
@@ -13942,7 +14349,11 @@ export interface ResultDomItem extends TreeNode {
13942
14349
  onResultMouseover(arg1: unknown, arg2: unknown, arg3: unknown): unknown;
13943
14350
  /** Render the content matches for this result item. */
13944
14351
  renderContentMatches(): void;
13945
- /** Set the collapsed state of this result item. */
14352
+ /**
14353
+ * Set the collapsed state of this result item.
14354
+ *
14355
+ * @returns Resolves when the collapse state has been applied.
14356
+ */
13946
14357
  setCollapse(arg1: unknown, arg2: unknown): Promise<unknown>;
13947
14358
  /**
13948
14359
  * Set whether this result item can be collapsed.
@@ -14069,7 +14480,11 @@ export interface RibbonItem {
14069
14480
  id: string;
14070
14481
  /** Tooltip title displayed on hover. */
14071
14482
  title: string;
14072
- /** Callback invoked when this ribbon item is clicked. */
14483
+ /**
14484
+ * Callback invoked when this ribbon item is clicked.
14485
+ *
14486
+ * @returns A promise that resolves when the callback completes.
14487
+ */
14073
14488
  callback(): Promise<void>;
14074
14489
  }
14075
14490
  /**
@@ -14146,7 +14561,13 @@ export interface SQLResultSet {
14146
14561
  export interface SQLResultSetRowList {
14147
14562
  /** Number of rows in the result set. */
14148
14563
  length: number;
14149
- /** Get a row by its index in the result set. */
14564
+ /**
14565
+ * Get a row by its index in the result set.
14566
+ *
14567
+ * @param index - The index of the row to retrieve.
14568
+ * @returns The row at the specified index.
14569
+ * @unofficial
14570
+ */
14150
14571
  item(index: number): unknown;
14151
14572
  }
14152
14573
  /**
@@ -14248,6 +14669,8 @@ export interface SearchView extends View {
14248
14669
  getQuery(): string;
14249
14670
  /**
14250
14671
  * Get the current view type.
14672
+ *
14673
+ * @returns The search view type.
14251
14674
  */
14252
14675
  getViewType(): typeof ViewType.Search;
14253
14676
  /**
@@ -14532,18 +14955,21 @@ export interface ShareReceiver {
14532
14955
  * Handles shared files.
14533
14956
  *
14534
14957
  * @param files - Shared files.
14958
+ * @returns A promise that resolves when the shared files are handled.
14535
14959
  */
14536
14960
  handleShareFiles(files: SharedFile[]): Promise<void>;
14537
14961
  /**
14538
14962
  * Handles shared text.
14539
14963
  *
14540
14964
  * @param text - Shared text.
14965
+ * @returns A promise that resolves when the shared text is handled.
14541
14966
  */
14542
14967
  handleShareText(text: string): Promise<void>;
14543
14968
  /**
14544
14969
  * Imports shared files.
14545
14970
  *
14546
14971
  * @param files - Shared files.
14972
+ * @returns A promise that resolves when the files are imported.
14547
14973
  */
14548
14974
  importFiles(files: SharedFile[]): Promise<void>;
14549
14975
  /**
@@ -14818,10 +15244,14 @@ export interface SuggestionContainer<T> {
14818
15244
  values: SearchResult[];
14819
15245
  /**
14820
15246
  * Amount of suggestions that can be displayed at once within containerEl.
15247
+ *
15248
+ * @returns The number of visible items.
14821
15249
  */
14822
15250
  get numVisibleItems(): number;
14823
15251
  /**
14824
15252
  * Height in pixels of the selected item.
15253
+ *
15254
+ * @returns The row height in pixels.
14825
15255
  */
14826
15256
  get rowHeight(): number;
14827
15257
  /**
@@ -14965,7 +15395,11 @@ export interface SyncPluginInstance extends InternalPluginInstance<SyncPlugin> {
14965
15395
  * @unofficial
14966
15396
  */
14967
15397
  export interface SyncView extends View {
14968
- /** Get the current view type. */
15398
+ /**
15399
+ * Get the current view type.
15400
+ *
15401
+ * @returns The sync view type.
15402
+ */
14969
15403
  getViewType(): typeof ViewType.Sync;
14970
15404
  }
14971
15405
  /**
@@ -15051,6 +15485,8 @@ export interface TableEditor {
15051
15485
  export interface TableView extends View {
15052
15486
  /**
15053
15487
  * Get view type.
15488
+ *
15489
+ * @returns The table view type.
15054
15490
  */
15055
15491
  getViewType(): typeof ViewType.Table;
15056
15492
  }
@@ -15351,6 +15787,8 @@ export interface Tree<T extends TreeItem> {
15351
15787
  view: View;
15352
15788
  /**
15353
15789
  * Root item of the tree view.
15790
+ *
15791
+ * @returns The root tree item.
15354
15792
  */
15355
15793
  get root(): TreeRoot<T>;
15356
15794
  /**
@@ -15386,6 +15824,7 @@ export interface Tree<T extends TreeItem> {
15386
15824
  * Handle deletion of selected nodes.
15387
15825
  *
15388
15826
  * @param event - The keyboard event that triggered the deletion.
15827
+ * @returns A promise that resolves when the selected items are deleted.
15389
15828
  */
15390
15829
  handleDeleteSelectedItems(event: KeyboardEvent): Promise<void>;
15391
15830
  /**
@@ -15501,6 +15940,7 @@ export interface TreeCollapsibleItem extends TreeItem {
15501
15940
  *
15502
15941
  * @param value - Whether the item should be collapsed.
15503
15942
  * @param animate - If set to `true`, will animate on collapse.
15943
+ * @returns Resolves when the collapse state has been applied.
15504
15944
  */
15505
15945
  setCollapsed(value: boolean, animate?: boolean): Promise<undefined>;
15506
15946
  /**
@@ -15513,12 +15953,14 @@ export interface TreeCollapsibleItem extends TreeItem {
15513
15953
  * Toggle collapsed state of tree item.
15514
15954
  *
15515
15955
  * @param animate - If set to `true`, will animate on collapse.
15956
+ * @returns Resolves when the collapse state has been toggled.
15516
15957
  */
15517
15958
  toggleCollapsed(animate?: boolean): Promise<undefined>;
15518
15959
  /**
15519
15960
  * Update the tree item's cover element.
15520
15961
  *
15521
15962
  * @param animate - If set to `true`, will animate on collapse.
15963
+ * @returns Resolves when the cover element has been updated.
15522
15964
  */
15523
15965
  updateCollapsed(animate?: boolean): Promise<undefined>;
15524
15966
  }
@@ -15597,7 +16039,11 @@ export interface TreeNodeVChildren<Item extends TreeNode, Owner extends TreeNode
15597
16039
  _children: Item[];
15598
16040
  /** The tree node that owns these children. */
15599
16041
  owner: Owner;
15600
- /** Get the array of child items. */
16042
+ /**
16043
+ * Get the array of child items.
16044
+ *
16045
+ * @returns The child items.
16046
+ */
15601
16047
  get children(): Item[];
15602
16048
  /**
15603
16049
  * Add a child item to this node.
@@ -16326,13 +16772,20 @@ export interface WebviewerDBStore {
16326
16772
  *
16327
16773
  * @param url - The URL of the history item.
16328
16774
  * @param title - Optional title for the history item.
16775
+ * @returns A promise that resolves when the history item is added.
16329
16776
  */
16330
16777
  addHistoryItem(url: string, title?: string): Promise<void>;
16331
16778
  /**
16332
16779
  * Clear all history items.
16780
+ *
16781
+ * @returns A promise that resolves when all history items are cleared.
16333
16782
  */
16334
16783
  clearHistoryItems(): Promise<void>;
16335
- /** Open and initialize the IndexedDB connection. */
16784
+ /**
16785
+ * Open and initialize the IndexedDB connection.
16786
+ *
16787
+ * @returns A promise that resolves when the connection is established.
16788
+ */
16336
16789
  connect(): Promise<void>;
16337
16790
  /**
16338
16791
  * Get all history items.
@@ -16354,6 +16807,7 @@ export interface WebviewerDBStore {
16354
16807
  * Remove specific history item based on its {@link WebviewerHistoryItem.id | id}.
16355
16808
  *
16356
16809
  * @param item - The history item to remove.
16810
+ * @returns A promise that resolves when the history item is removed.
16357
16811
  */
16358
16812
  removeHistoryItem(item: WebviewerHistoryItem): Promise<void>;
16359
16813
  /**
@@ -16362,6 +16816,7 @@ export interface WebviewerDBStore {
16362
16816
  * @param el - The element to add the icon to.
16363
16817
  * @param url - The URL to get the icon for.
16364
16818
  * @param source - Optional source URL for the icon.
16819
+ * @returns A promise that resolves when the icon is set on the element.
16365
16820
  */
16366
16821
  setIcon(el: HTMLElement, url: string, source?: string): Promise<void>;
16367
16822
  /**
@@ -16405,9 +16860,15 @@ export interface WebviewerHistoryItem {
16405
16860
  export interface WebviewerHistoryView extends ItemView {
16406
16861
  /**
16407
16862
  * Get the current view type.
16863
+ *
16864
+ * @returns The webviewer history view type.
16408
16865
  */
16409
16866
  getViewType(): typeof ViewType.WebviewerHistory;
16410
- /** Refresh the browsing history list. */
16867
+ /**
16868
+ * Refresh the browsing history list.
16869
+ *
16870
+ * @returns The result of refreshing the history.
16871
+ */
16411
16872
  update(): Promise<unknown>;
16412
16873
  }
16413
16874
  /**
@@ -16459,13 +16920,32 @@ export interface WebviewerPluginInstance extends InternalPluginInstance<Webviewe
16459
16920
  defaultOn: false;
16460
16921
  /** URLs that are pending to be added to the ignore list. */
16461
16922
  pendingIgnoredURLs: string[];
16462
- /** Build a search engine URL for the given search query. */
16923
+ /**
16924
+ * Build a search engine URL for the given search query.
16925
+ *
16926
+ * @param searchQuery - The search query to build a URL for.
16927
+ * @returns The search engine URL.
16928
+ */
16463
16929
  getSearchEngineUrl(searchQuery: string): string;
16464
- /** Handle a custom open URL event from the webview. */
16930
+ /**
16931
+ * Handle a custom open URL event from the webview.
16932
+ *
16933
+ * @param event - The custom event containing the URL details.
16934
+ */
16465
16935
  handleOpenUrl(event: CustomEvent<WebviewerOpenUrlEventDetail>): void;
16466
- /** Open a URL in the web viewer. */
16936
+ /**
16937
+ * Open a URL in the web viewer.
16938
+ *
16939
+ * @param url - The URL to open.
16940
+ * @param newLeaf - The pane type or whether to open in a new leaf.
16941
+ * @param active - Whether to make the new leaf active.
16942
+ */
16467
16943
  openUrl(url: string, newLeaf?: PaneType | boolean, active?: boolean): void;
16468
- /** Open a URL in the system default browser. */
16944
+ /**
16945
+ * Open a URL in the system default browser.
16946
+ *
16947
+ * @param url - The URL to open externally.
16948
+ */
16469
16949
  openUrlExternally(url: string): void;
16470
16950
  /** Update the current browsing session state. */
16471
16951
  updateSession(): void;
@@ -16539,6 +17019,8 @@ export interface WebviewerView extends ItemView {
16539
17019
  getReaderModeContent(): Promise<unknown>;
16540
17020
  /**
16541
17021
  * Get the current view type.
17022
+ *
17023
+ * @returns The webviewer view type.
16542
17024
  */
16543
17025
  getViewType(): typeof ViewType.Webviewer;
16544
17026
  /** Hide all view content (webview, reader, error). */
@@ -16782,6 +17264,8 @@ export interface WidgetEditorView extends EmbeddedEditorView {
16782
17264
  loadContents(data: string, cache: CachedMetadata): void;
16783
17265
  /**
16784
17266
  * Load file from cache based on stored path.
17267
+ *
17268
+ * @returns A promise that resolves when the file has been loaded.
16785
17269
  */
16786
17270
  loadFile(): Promise<void>;
16787
17271
  /**
@@ -16842,6 +17326,7 @@ export interface WidgetEditorView extends EmbeddedEditorView {
16842
17326
  *
16843
17327
  * @param data - Data to save.
16844
17328
  * @param delayed - Whether to delay the save.
17329
+ * @returns A promise that resolves when the data has been saved.
16845
17330
  */
16846
17331
  save(data: string, delayed?: boolean): Promise<void>;
16847
17332
  /**
@@ -16923,19 +17408,49 @@ export interface WorkspaceLeafHistory {
16923
17408
  forwardHistory: WorkspaceLeafHistoryState[];
16924
17409
  /** The workspace leaf that owns this history. */
16925
17410
  owner: WorkspaceLeaf;
16926
- /** Navigate back to the previous state. */
17411
+ /**
17412
+ * Navigate back to the previous state.
17413
+ *
17414
+ * @returns A promise that resolves when navigation is complete.
17415
+ */
16927
17416
  back(): Promise<void>;
16928
- /** Restore history from a serialized representation. */
17417
+ /**
17418
+ * Restore history from a serialized representation.
17419
+ *
17420
+ * @param e - The serialized history data.
17421
+ */
16929
17422
  deserialize(e: SerializedWorkspaceLeafHistory): void;
16930
- /** Navigate forward to the next state. */
17423
+ /**
17424
+ * Navigate forward to the next state.
17425
+ *
17426
+ * @returns A promise that resolves when navigation is complete.
17427
+ */
16931
17428
  forward(): Promise<void>;
16932
- /** Navigate by the given number of steps (negative for back, positive for forward). */
17429
+ /**
17430
+ * Navigate by the given number of steps (negative for back, positive for forward).
17431
+ *
17432
+ * @param step - The number of steps to navigate.
17433
+ * @returns A promise that resolves when navigation is complete.
17434
+ */
16933
17435
  go(step: number): Promise<void>;
16934
- /** Push a new state onto the back history stack. */
17436
+ /**
17437
+ * Push a new state onto the back history stack.
17438
+ *
17439
+ * @param state - The history state to push.
17440
+ */
16935
17441
  pushState(state: WorkspaceLeafHistoryState): void;
16936
- /** Serialize the history for persistence. */
17442
+ /**
17443
+ * Serialize the history for persistence.
17444
+ *
17445
+ * @returns The serialized history data.
17446
+ */
16937
17447
  serialize(): SerializedWorkspaceLeafHistory;
16938
- /** Update the current state in the history. */
17448
+ /**
17449
+ * Update the current state in the history.
17450
+ *
17451
+ * @param state - The history state to update with.
17452
+ * @returns A promise that resolves when the state is updated.
17453
+ */
16939
17454
  updateState(state: WorkspaceLeafHistoryState): Promise<void>;
16940
17455
  }
16941
17456
  /**