Added indexWait and fixed the return type for get. (#20521)

* Fixed the return type for get.

Fixed the return type for get as it returns a single result not a cursor.

* Update index.d.ts
This commit is contained in:
Ed Bishop
2017-10-23 12:27:08 -07:00
committed by Sheetal Nandi
parent cc8bf81a21
commit 0cc18fa090
+2 -1
View File
@@ -238,11 +238,12 @@ declare module "rethinkdb" {
indexCreate(name: string, index?: ExpressionFunction<any>): Operation<CreateResult>;
indexDrop(name: string): Operation<DropResult>;
indexList(): Operation<string[]>;
indexWait(name?: string): Operation<Array<{ index: string, ready: true, function: number, multi: boolean, geo: boolean, outdated: boolean }>>;
insert(obj: any[], options?: InsertOptions): Operation<WriteResult>;
insert(obj: any, options?: InsertOptions): Operation<WriteResult>;
get(key: string): Sequence; // primary key
get<TObjectType extends object>(key: string): Operation<TObjectType | null>;
getAll(key: string, index?: Index): Sequence; // without index defaults to primary key
getAll(...keys: string[]): Sequence;
wait(WaitOptions?: WaitOptions): WaitResult;