From 8bfb64811e76ee7217a78ae355ae6e6d8c6802fb Mon Sep 17 00:00:00 2001 From: sqwk Date: Mon, 6 Mar 2017 23:40:18 +0100 Subject: [PATCH] Update Lowdb Test --- lowdb/index.d.ts | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/lowdb/index.d.ts b/lowdb/index.d.ts index 2beda1e2ba..4118372647 100644 --- a/lowdb/index.d.ts +++ b/lowdb/index.d.ts @@ -1,3 +1,8 @@ +// Type definitions for Lowdb 0.15 +// Project: https://github.com/typicode/lowdb +// Definitions by: typicode, +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + declare namespace lowdb { interface PromiseLike { @@ -167,7 +172,7 @@ declare namespace lowdb { /** * @see _.get */ - get(object: Object, + get(object: any, path: string | number | boolean | Array, defaultValue?: TResult ): LoDashWrapper; @@ -184,7 +189,7 @@ declare namespace lowdb { * @see _.mixin */ mixin( - source: Dictionary, + source: Dictionary<() => void>, options?: MixinOptions ): LoDashWrapper; @@ -370,12 +375,12 @@ declare namespace lowdb { /** * @see _.sortBy */ - sortBy(...iteratees: (ListIterator | Object | string)[]): LoDashWrapper; + sortBy(...iteratees: (ListIterator | any | string)[]): LoDashWrapper; /** * @see _.sortBy */ - sortBy(iteratees: (ListIterator | string | Object)[]): LoDashWrapper; + sortBy(iteratees: (ListIterator | string | any)[]): LoDashWrapper; /** * @see _.slice @@ -441,7 +446,7 @@ declare namespace lowdb { * @param deserialize The deserialize function to apply. * @return Returns the deserialized db object. */ - read?(source: string, deserialize: any): Object + read?(source: string, deserialize: any): {} /** * Writes to the database. @@ -470,7 +475,7 @@ declare namespace lowdb { * @param obj The object to serialize. * @return Returns the serialized object string. */ - serialize(obj: Object): string + serialize(obj: any): string /** * Writes to the database. @@ -478,7 +483,7 @@ declare namespace lowdb { * @param data The object to deserialize. * @return Returns the deserialized object. */ - deserialize(data: string): Object + deserialize(data: string): any } export interface Options { @@ -508,13 +513,13 @@ declare namespace lowdb { * Access current database state. * Returns Returns the database state. */ - getState(): Object + getState(): any /** * Drop or reset database state. * @param newState New state of the database */ - setState(newState: Object): void + setState(newState: any): void /** * Persist database. @@ -532,13 +537,13 @@ declare namespace lowdb { * Read database. * @param source The source location. */ - read(source?: string): Object + read(source?: string): any /** * Read database. * @param source The source location. */ - read(source?: string): PromiseLike + read(source?: string): PromiseLike }