UNPKG

1.48 kBMarkdownView Raw
1# Installation
2> `npm install --save @types/abbrev`
3
4# Summary
5This package contains type definitions for abbrev (https://github.com/isaacs/abbrev-js#readme).
6
7# Details
8Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/abbrev.
9## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/abbrev/index.d.ts)
10````ts
11// Type definitions for abbrev 1.1
12// Project: https://github.com/isaacs/abbrev-js#readme
13// Definitions by: BendingBender <https://github.com/BendingBender>
14// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
15
16export = abbrev;
17
18declare function abbrev(words: ReadonlyArray<abbrev.Abbreviable>): { [abbreviation: string]: string };
19declare function abbrev(...words: ReadonlyArray<abbrev.Abbreviable>): { [abbreviation: string]: string };
20
21declare namespace abbrev {
22 function monkeyPatch(): void;
23
24 type Abbreviable = string | { toString(): string };
25}
26
27declare global {
28 interface Array<T> {
29 abbrev(): { [abbreviation: string]: string };
30 }
31
32 interface ReadonlyArray<T> {
33 abbrev(): { [abbreviation: string]: string };
34 }
35
36 interface Object {
37 abbrev(): { [abbreviation: string]: string };
38 }
39}
40
41````
42
43### Additional Details
44 * Last updated: Sun, 26 Sep 2021 14:31:24 GMT
45 * Dependencies: none
46 * Global values: none
47
48# Credits
49These definitions were written by [BendingBender](https://github.com/BendingBender).
50
\No newline at end of file