mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-26 12:10:44 +08:00
flat: definition of the module has been added
This commit is contained in:
1 parent
68548c2daa
commit
9db69fb4ce
1 file changed
+41
Vendored
+41
@@ -0,0 +1,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;
|
||||
}
|
||||
Reference in new issue
Block a user