1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | export declare abstract class Wordlist {
|
7 | locale: string;
|
8 | |
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 | constructor(locale: string);
|
19 | /**
|
20 | * Sub-classes may override this to provide a language-specific
|
21 | * method for spliting %%phrase%% into individual words.
|
22 | *
|
23 | * By default, %%phrase%% is split using any sequences of
|
24 | * white-space as defined by regular expressions (i.e. ``/\s+/``).
|
25 | */
|
26 | split(phrase: string): Array<string>;
|
27 | /**
|
28 | * Sub-classes may override this to provider a language-specific
|
29 | * method for joining %%words%% into a phrase.
|
30 | *
|
31 | * By default, %%words%% are joined by a single space.
|
32 | */
|
33 | join(words: Array<string>): string;
|
34 | /**
|
35 | * Maps an 11-bit value into its coresponding word in the list.
|
36 | *
|
37 | * Sub-classes MUST override this.
|
38 | */
|
39 | abstract getWord(index: number): string;
|
40 | /**
|
41 | * Maps a word to its corresponding 11-bit value.
|
42 | *
|
43 | * Sub-classes MUST override this.
|
44 | */
|
45 | abstract getWordIndex(word: string): number;
|
46 | }
|
47 | //# sourceMappingURL=wordlist.d.ts.map |
\ | No newline at end of file |