UNPKG

750 BTypeScriptView Raw
1// Type definitions for abbrev 1.1
2// Project: https://github.com/isaacs/abbrev-js#readme
3// Definitions by: BendingBender <https://github.com/BendingBender>
4// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
6export = abbrev;
7
8declare function abbrev(words: string[]): { [abbreviation: string]: string };
9declare function abbrev(...words: string[]): { [abbreviation: string]: string };
10
11declare namespace abbrev {
12 function monkeyPatch(): void;
13}
14
15declare global {
16 interface Array<T> {
17 abbrev(): { [abbreviation: string]: string };
18 }
19
20 interface ReadonlyArray<T> {
21 abbrev(): { [abbreviation: string]: string };
22 }
23
24 interface Object {
25 abbrev(): { [abbreviation: string]: string };
26 }
27}