forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flat.d.ts
41 lines (34 loc) · 766 Bytes
/
flat.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
41
// Type definitions for flat
// Project: https://github.com/hughsk/flat
// Definitions by: Ilya Mochalov <https://github.com/chrootsu>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module FlatTypes {
interface FlattenOptions {
delimiter?: string;
safe?: boolean;
maxDepth?: number;
}
interface Flatten {
<TTarget, TResult>(
target: TTarget,
options?: FlattenOptions
): TResult;
flatten: Flatten;
unflatten: Unflatten;
}
interface UnflattenOptions {
delimiter?: string;
object?: boolean;
overwrite?: boolean;
}
interface Unflatten {
<TTarget, TResult>(
target: TTarget,
options?: UnflattenOptions
): TResult;
}
}
declare module "flat" {
var flatten: FlatTypes.Flatten;
export = flatten;
}