Skip to content

Commit 4d1008d

Browse files
Fix empty JSDoc stubs across codebase (#279)
1 parent 3c03e66 commit 4d1008d

99 files changed

Lines changed: 188 additions & 554 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/pages/test/frontend/fixtures.mjs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,7 @@ export function createPagesFixtures(options = {}) {
8282
}
8383

8484
const fixtures = createPagesFixtures()
85-
/**
86-
*
87-
*/
85+
/** 默认 Pages E2E 用例(`createPagesFixtures()` 产物)。 */
8886
export const test = fixtures.test
89-
/**
90-
*
91-
*/
87+
/** 重导出 Playwright `expect` 断言。 */
9288
export { expect }

.github/pages/wait/install/index.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -613,9 +613,7 @@ const checkFountInstallerAlive = async () => {
613613
*/
614614
const whenFountInstallerFails = () => {
615615
return new Promise(resolve => {
616-
/**
617-
*
618-
*/
616+
/** 轮询直至安装程序进程退出。 */
619617
const check = async () => {
620618
if (await checkFountInstallerAlive()) setTimeout(check, 1000)
621619
else resolve()

src/decl/chatLog.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,5 @@ export class chatLogEntry_t {
216216
}
217217
}
218218

219-
/**
220-
*
221-
*/
219+
/** 聊天日志条目数组。 */
222220
export type chatLog_t = chatLogEntry_t[]

src/decl/p2pAPI.ts

Lines changed: 20 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,7 @@ export type PermissionBitmap = bigint
105105

106106
// ---- Denylist(节点连接拒绝 deny,`denylist.mjs`;非 Social block / 群 ban)----
107107

108-
/**
109-
*
110-
*/
108+
/** denylist 拒绝粒度:主体、实体或节点。 */
111109
export type DenyScope = 'subject' | 'entity' | 'node'
112110

113111
/** 磁盘/API 单条 denylist 条目。 */
@@ -125,13 +123,9 @@ export interface SerializedDenylist {
125123

126124
// ---- Personal lists(`personal_block.mjs`:block=联邦公开拉黑,hide=纯本地)----
127125

128-
/**
129-
*
130-
*/
126+
/** 个人列表作用域:实体或主体。 */
131127
export type PersonalListScope = 'entity' | 'subject'
132-
/**
133-
*
134-
*/
128+
/** 个人列表类型:联邦公开拉黑或纯本地隐藏。 */
135129
export type PersonalListKind = 'block' | 'hide'
136130

137131
/** `GET /api/parts/shells:chat/personal-lists` 与 Social profile 共用条目形状。 */
@@ -141,9 +135,7 @@ export interface PersonalListEntry {
141135
value: string
142136
}
143137

144-
/**
145-
*
146-
*/
138+
/** `GET …/personal-lists` 响应体。 */
147139
export interface PersonalListsResponse {
148140
entries: PersonalListEntry[]
149141
}
@@ -155,9 +147,7 @@ export interface MailboxSummaryResponse {
155147

156148
// ---- 群成员 / 频道 ----
157149

158-
/**
159-
*
160-
*/
150+
/** 群成员物化记录。 */
161151
export interface Member {
162152
pubKeyHash: string
163153
homeNodeHash?: string | null
@@ -172,9 +162,7 @@ export interface Member {
172162
pubKeyHex?: string | null
173163
}
174164

175-
/**
176-
*
177-
*/
165+
/** 群角色定义(权限、排序与展示)。 */
178166
export interface Role {
179167
name: string
180168
color: string
@@ -184,17 +172,13 @@ export interface Role {
184172
isHoisted: boolean
185173
}
186174

187-
/**
188-
*
189-
*/
175+
/** 频道级权限允许/拒绝覆写。 */
190176
export interface ChannelPermissionOverride {
191177
allow: Partial<PermissionFlags>
192178
deny: Partial<PermissionFlags>
193179
}
194180

195-
/**
196-
*
197-
*/
181+
/** 群频道元数据(文本、列表或流媒体)。 */
198182
export interface Channel {
199183
id: string
200184
type: 'text' | 'list' | 'streaming'
@@ -208,27 +192,21 @@ export interface Channel {
208192
manualItems?: ListItem[]
209193
}
210194

211-
/**
212-
*
213-
*/
195+
/** 列表频道中的手动条目。 */
214196
export interface ListItem {
215197
title: string
216198
desc?: string
217199
targetChannelId?: string
218200
url?: string
219201
}
220202

221-
/**
222-
*
223-
*/
203+
/** 群文件区文件夹节点。 */
224204
export interface FileFolder {
225205
name: string
226206
parentFolderId: string | null
227207
}
228208

229-
/**
230-
*
231-
*/
209+
/** 群展示元数据(名称、头像与分叉信息)。 */
232210
export interface GroupMeta {
233211
name: string
234212
description: string
@@ -284,9 +262,7 @@ export interface GroupSettings {
284262

285263
// ---- 信誉账本 / 邀请边 / 文件主密钥轮换 ----
286264

287-
/**
288-
*
289-
*/
265+
/** 信誉账本条目(slash 或 reset)。 */
290266
export interface ReputationLedgerEntry {
291267
targetPubKeyHash: string
292268
sender: string
@@ -296,9 +272,7 @@ export interface ReputationLedgerEntry {
296272
payloadRef?: string
297273
}
298274

299-
/**
300-
*
301-
*/
275+
/** 邀请图边(入群关系与可选信誉边)。 */
302276
export interface InviteEdge {
303277
from: string
304278
to: string
@@ -308,19 +282,15 @@ export interface InviteEdge {
308282
fileKeyWraps?: boolean
309283
}
310284

311-
/**
312-
*
313-
*/
285+
/** 文件主密钥轮换事件摘要。 */
314286
export interface FileMasterKeyRotationEntry {
315287
eventId: string
316288
generation: number
317289
nonce: string
318290
type: 'kick' | 'rotate'
319291
}
320292

321-
/**
322-
*
323-
*/
293+
/** 群共享文件元数据与分块清单。 */
324294
export interface FileInfo {
325295
name: string
326296
size: number
@@ -332,9 +302,7 @@ export interface FileInfo {
332302
key_generation?: number
333303
}
334304

335-
/**
336-
*
337-
*/
305+
/** 加密文件单个分块的存储定位与哈希。 */
338306
export interface ChunkInfo {
339307
chunkIndex: number
340308
chunkHash: string
@@ -415,14 +383,10 @@ export interface SerializedGroupState extends GroupStateCore {
415383
bannedNodes: string[]
416384
}
417385

418-
/**
419-
*
420-
*/
386+
/** checkpoint `members_record` 字段形态(序列化群状态)。 */
421387
export type CheckpointMembersRecord = SerializedGroupState
422388

423-
/**
424-
*
425-
*/
389+
/** DAG checkpoint 快照(epoch、overlay 与文件树等)。 */
426390
export interface Checkpoint {
427391
local_node_id: string | null
428392
members_record: CheckpointMembersRecord
@@ -441,18 +405,14 @@ export interface Checkpoint {
441405
checkpoint_signature?: string
442406
}
443407

444-
/**
445-
*
446-
*/
408+
/** 入群 PoW 挑战(难度与时间戳)。 */
447409
export interface PowChallenge {
448410
challenge: string
449411
difficulty: number
450412
timestamp: number
451413
}
452414

453-
/**
454-
*
455-
*/
415+
/** PoW 解答(nonce 与哈希)。 */
456416
export interface PowSolution {
457417
nonce: number
458418
hash: string

src/decl/socialAPI.ts

Lines changed: 15 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ export interface SocialPostRef {
5656
postId: string
5757
}
5858

59-
/**
60-
*
61-
*/
59+
/** 群 ref(群 id 与可选频道 id)。 */
6260
export interface SocialGroupRef {
6361
groupId: string
6462
channelId?: string
@@ -165,35 +163,25 @@ export interface SocialPollVoteContent extends SocialEngagementTarget {
165163
choices: number[]
166164
}
167165

168-
/**
169-
*
170-
*/
166+
/** 点赞事件 content(复用互动 target 字段)。 */
171167
export type SocialLikeContent = SocialEngagementTarget
172168

173-
/**
174-
*
175-
*/
169+
/** 转发事件 content,可选附言。 */
176170
export interface SocialRepostContent extends SocialEngagementTarget {
177171
comment?: string
178172
}
179173

180-
/**
181-
*
182-
*/
174+
/** 关注事件 content。 */
183175
export interface SocialFollowContent {
184176
targetEntityHash: string
185177
}
186178

187-
/**
188-
*
189-
*/
179+
/** 拉黑事件 content。 */
190180
export interface SocialBlockContent {
191181
targetEntityHash: string
192182
}
193183

194-
/**
195-
*
196-
*/
184+
/** 删帖事件 content。 */
197185
export interface SocialPostDeleteContent {
198186
targetPostId: string
199187
}
@@ -329,9 +317,7 @@ export interface SocialRepostFeedItem extends SocialFeedItemBase {
329317
repostComment: string
330318
}
331319

332-
/**
333-
*
334-
*/
320+
/** 时间线 feed 条目:原创帖或转发。 */
335321
export type SocialFeedItem = SocialPostFeedItem | SocialRepostFeedItem
336322

337323
/** `GET /feed` 等分页响应。 */
@@ -364,9 +350,7 @@ export interface SocialNotificationItem {
364350
aggregateKey?: string | null
365351
}
366352

367-
/**
368-
*
369-
*/
353+
/** 通知分页响应(含未读数与游标)。 */
370354
export interface SocialNotificationsPage {
371355
notifications: SocialNotificationItem[]
372356
nextCursor: string | null
@@ -383,17 +367,13 @@ export interface SocialFollowResponse {
383367
isFollowing: boolean
384368
}
385369

386-
/**
387-
*
388-
*/
370+
/** 拉黑写操作响应。 */
389371
export interface SocialBlockResponse {
390372
entityHash: string
391373
blocked: boolean
392374
}
393375

394-
/**
395-
*
396-
*/
376+
/** 隐藏写操作响应。 */
397377
export interface SocialHideResponse {
398378
entityHash: string
399379
hidden: boolean
@@ -464,28 +444,22 @@ export interface SocialRpcDiscoverRequest {
464444
cursor?: string
465445
}
466446

467-
/**
468-
*
469-
*/
447+
/** 联邦 RPC:账号发现响应。 */
470448
export interface SocialRpcDiscoverResponse {
471449
type: 'social_discover_response'
472450
accounts: SocialDiscoverAccount[]
473451
nextCursor?: string | null
474452
}
475453

476-
/**
477-
*
478-
*/
454+
/** 联邦 RPC:帖子发现请求。 */
479455
export interface SocialRpcPostDiscoverRequest {
480456
type: 'social_post_discover_request'
481457
n?: number
482458
mediaOnly?: boolean
483459
cursor?: string
484460
}
485461

486-
/**
487-
*
488-
*/
462+
/** 联邦 RPC:帖子发现响应。 */
489463
export interface SocialRpcPostDiscoverResponse {
490464
type: 'social_post_discover_response'
491465
posts: SocialDiscoverPost[]
@@ -506,9 +480,7 @@ export interface SocialMessageEvent {
506480
lang: string
507481
}
508482

509-
/**
510-
*
511-
*/
483+
/** char 社交接口入站关注事件。 */
512484
export interface SocialFollowEvent {
513485
username: string
514486
charPartName: string
@@ -517,9 +489,7 @@ export interface SocialFollowEvent {
517489
targetEntityHash: string
518490
}
519491

520-
/**
521-
*
522-
*/
492+
/** char.interfaces.social 可选回调面。 */
523493
export interface SocialCharInterface {
524494
OnMessage?: (event: SocialMessageEvent) => Promise<boolean>
525495
OnFollow?: (event: SocialFollowEvent) => Promise<void>

0 commit comments

Comments
 (0)