style(ui): request that all types defined

- check in more restrictive mode = request types
- define main types in static/js/core/types.js
This commit is contained in:
Edouard Vanbelle
2026-04-30 02:02:27 +02:00
parent 97ea87efc2
commit 3050556dc0
29 changed files with 560 additions and 345 deletions
+6 -1
View File
@@ -10,10 +10,14 @@ import { formatDateShort } from '../../core/formatters.js';
import { i18n } from '../../core/i18n.js';
import { fileSharing } from '../../features/sharing/fileSharing.js';
/** @import {Share} from '../../core/types.js' */
const TTL = 5 * 60 * 1000; // 5 min
const sharedView = {
// State
/** @type {Array<Share>} */
items: [],
_expires: 0,
@@ -21,6 +25,7 @@ const sharedView = {
/** @type {Map<string, boolean>} key = "file:<id>" | "folder:<id>" */
_knownItemsId: new Map(),
/** @type {Array<Share>} */
filteredItems: [],
currentItem: null,
@@ -67,7 +72,7 @@ const sharedView = {
*
* @param {boolean} force ignore cache
*/
async loadItems(force) {
async loadItems(force = false) {
if (this._expires > Date.now() && !force) return;
try {