返回 JoyAI-Echo
countable.d.ts
根目录 / echo_longvideo / Director_Agent / webui / src / types / countable.d.ts
1 declare module "countable" {
2 export interface CountableResult {
3 paragraphs: number;
4 sentences: number;
5 words: number;
6 characters: number;
7 all: number;
8 }
9
10 export interface CountableOptions {
11 hardReturns?: boolean;
12 stripTags?: boolean;
13 ignore?: string[];
14 }
15
16 interface Countable {
17 on(
18 elements: Element | Element[],
19 callback: (result: CountableResult) => void,
20 options?: CountableOptions,
21 ): Countable;
22 off(elements: Element | Element[]): Countable;
23 count(
24 target: string | Element,
25 callback: (result: CountableResult) => void,
26 options?: CountableOptions,
27 ): Countable;
28 enabled(elements: Element | Element[]): boolean;
29 }
30
31 const Countable: Countable;
32 export default Countable;
33 }
34
34 lines TYPESCRIPT