From c8379dd3b2dc1bbc5cc6dbbbd9892eeaa7983500 Mon Sep 17 00:00:00 2001 From: Mohamed Hegazy Date: Fri, 8 Jul 2016 11:59:44 -0700 Subject: [PATCH] Fix noImplicitAny warnings for rethinkdb --- rethinkdb/index.d.ts | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/rethinkdb/index.d.ts b/rethinkdb/index.d.ts index 8194905556..ab1a0c6ad7 100644 --- a/rethinkdb/index.d.ts +++ b/rethinkdb/index.d.ts @@ -4,10 +4,9 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // Reference: http://www.rethinkdb.com/api/#js // TODO: Document manipulation and below + /// - - export declare function connect(host: ConnectionOptions, cb?: (err: Error, conn: Connection) => void): Promise; export declare function dbCreate(name: string): Operation; @@ -35,11 +34,11 @@ export declare function branch(test: Expression, trueBranch: Expression export declare class Cursor { hasNext(): boolean; - each(cb: (err: Error, row: any) => void, done?: () => void); - each(cb: (err: Error, row: any) => boolean, done?: () => void); // returning false stops iteration - next(cb: (err: Error, row: any) => void); - toArray(cb: (err: Error, rows: any[]) => void); - close(); + each(cb: (err: Error, row: any) => void, done?: () => void): void; + each(cb: (err: Error, row: any) => boolean, done?: () => void): void; // returning false stops iteration + next(cb: (err: Error, row: any) => void): void; + toArray(cb: (err: Error, rows: any[]) => void): void; + close(): void; } interface ConnectionOptions { @@ -50,11 +49,11 @@ interface ConnectionOptions { } interface Connection { - close(); + close(): void; reconnect(cb?: (err: Error, conn: Connection) => void): Promise; - use(dbName: string); - addListener(event: string, cb: Function); - on(event: string, cb: Function); + use(dbName: string): void; + addListener(event: string, cb: Function): void; + on(event: string, cb: Function): void; } interface Db {