forked from e-/Hangul.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhangul.d.ts
40 lines (37 loc) · 1.17 KB
/
hangul.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
declare class Searcher {
public string: string;
public disassembled: string;
constructor(str: string);
public search(str: string): number;
}
declare interface Hangul {
Searcher: typeof Searcher;
disassemble(str: string, grouped?: false): string[];
disassemble(str: string, grouped?: true): string[][];
disassembleToString(str: string): string;
assemble(arr: string[]): string;
search(a: string, b: string): number;
rangeSearch(haystack: string, needle: string): number[][];
isComplete(c: string): boolean;
isCompleteAll(str: string): boolean;
isConsonant(c: string): boolean;
isConsonantAll(str: string): boolean;
isHangul(c: string): boolean;
isHangulAll(str: string): boolean;
isVowel(c: string): boolean;
isVowelAll(str: string): boolean;
isCho(c: string): boolean;
isChoAll(str: string): boolean;
isJong(c: string): boolean;
isJongAll(str: string): boolean;
endsWithConsonant(c: string): boolean;
// Alias functions.
d(str: string, grouped?: false): string[];
d(str: string, grouped?: true): string[][];
ds(str: string): string;
a(arr: string[]): string;
}
declare const hangul: Hangul;
declare module 'hangul-js' {
export = hangul;
}