UNPKG

623 BTypeScriptView Raw
1export = abbrev;
2
3declare function abbrev(words: readonly abbrev.Abbreviable[]): { [abbreviation: string]: string };
4declare function abbrev(...words: readonly abbrev.Abbreviable[]): { [abbreviation: string]: string };
5
6declare namespace abbrev {
7 function monkeyPatch(): void;
8
9 type Abbreviable = string | { toString(): string };
10}
11
12declare global {
13 interface Array<T> {
14 abbrev(): { [abbreviation: string]: string };
15 }
16
17 interface ReadonlyArray<T> {
18 abbrev(): { [abbreviation: string]: string };
19 }
20
21 interface Object {
22 abbrev(): { [abbreviation: string]: string };
23 }
24}