Skip to content

Commit f0fc6ab

Browse files
committed
🚧 Add StringLc
1 parent 554d9b2 commit f0fc6ab

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

api/response.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import {
55
Page as PageBase,
66
PageId,
77
ProjectId,
8+
StringLc,
89
UserId,
910
} from "../base.ts";
10-
import { NotFoundError, NotMemberError } from "./error.ts";
1111

1212
/** 関連ページのメタデータ */
1313
export interface RelatedPage extends PageBase {
14-
/** ページ内のリンク */ linksLc: string[];
14+
/** ページ内のリンク */ linksLc: StringLc[];
1515
/** おそらく被リンク数 */ linked: number;
1616
}
1717

base.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,9 @@ export type CommitId = string;
3333
export type PageId = string;
3434
/** the project id */
3535
export type ProjectId = string;
36+
/** the formatted string
37+
*
38+
* format rule:
39+
* - UPPER CASE -> upper_case
40+
*/
41+
export type StringLc = string;

userscript.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { ParsedLine } from "./userscript/blocks.ts";
2+
import { StringLc } from "./base.ts";
23

34
export type Layout =
45
| "list"
@@ -78,7 +79,7 @@ export interface PageBrief {
7879
/** whether the page contains any image */ hasIcon?: boolean;
7980
/** the page id */ id: string;
8081
/** the page title */ title: string;
81-
/** the converted page title */ titleLc: string;
82+
titleLc: StringLc;
8283
/** updated time */ updated: number;
8384
}
8485

0 commit comments

Comments
 (0)