Page type-check: noImplicitAny, every parameter and variable typed (#235)
290 places the type-check could not see into, mostly parameters, now typed with web/src/types.ts (feeds, items, files, accounts, log lines, the directory's rows and items). Two changes run differently in form only: the seek and volume inputs divide Number(value) where they divided the string, and esc's table has a name. Null checks are #236. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -113,3 +113,41 @@ interface State {
|
||||
me: Me | null;
|
||||
sort: {col: string, dir: 'asc' | 'desc'};
|
||||
}
|
||||
|
||||
/// An account, `/api/users` (web.rs list_users).
|
||||
interface Account {
|
||||
id: number;
|
||||
name: string;
|
||||
admin: boolean;
|
||||
/// Has a password; none signs in through the proxy.
|
||||
password: boolean;
|
||||
created: number | null;
|
||||
last_login: number | null;
|
||||
}
|
||||
|
||||
/// A line of the daemon's log, `/api/logs` (logbuf.rs LogLine).
|
||||
interface LogLine {
|
||||
seq: number;
|
||||
ts: number;
|
||||
level: string;
|
||||
target: string;
|
||||
msg: string;
|
||||
}
|
||||
|
||||
/// `/api/directory-admin`: the servers sharing with the directory and the feeds it blocks
|
||||
/// (directory lib.rs Instance, Blocked).
|
||||
interface DirAdmin {
|
||||
instances: {name: string, feeds: number, subscribers: number}[];
|
||||
blocked: {id: string, url: string | null, title: string | null, at: number}[];
|
||||
}
|
||||
|
||||
/// One of a listed feed's latest items, on its page in the Directory (web.rs ListedItem): never
|
||||
/// its files.
|
||||
interface ListedItem {
|
||||
guid: string;
|
||||
title: string | null;
|
||||
link: string | null;
|
||||
published: number | null;
|
||||
duration: number | null;
|
||||
description: string | null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user