mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Merge pull request #23933 from AdrianFarmadin/master
RethinkDb `Table.getIntersecting()` support
This commit is contained in:
Vendored
+12
-2
@@ -1,6 +1,6 @@
|
||||
// Type definitions for RethinkDB 2.3
|
||||
// Project: http://rethinkdb.com/
|
||||
// Definitions by: Alex Gorbatchev <https://github.com/alexgorbatchev>
|
||||
// Definitions by: Alex Gorbatchev <https://github.com/alexgorbatchev>, Adrian Farmadin <https://github.com/AdrianFarmadin>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -40,6 +40,9 @@ declare module "rethinkdb" {
|
||||
export function asc(property: string): Sort;
|
||||
export function desc(property: string): Sort;
|
||||
|
||||
export function point(lng: number, lat: number): Point;
|
||||
export function polygon(...point: Point[]): Polygon;
|
||||
|
||||
export var count: Aggregator;
|
||||
export function sum(prop: string): Aggregator;
|
||||
export function avg(prop: string): Aggregator;
|
||||
@@ -233,7 +236,13 @@ declare module "rethinkdb" {
|
||||
* See: https://rethinkdb.com/api/javascript/has_fields/
|
||||
*/
|
||||
hasFields(...fields: string[]): T;
|
||||
}
|
||||
}
|
||||
|
||||
interface Geometry { }
|
||||
|
||||
interface Point { }
|
||||
|
||||
interface Polygon extends Geometry { }
|
||||
|
||||
interface Table extends Sequence, HasFields<Sequence> {
|
||||
indexCreate(name: string, index?: ExpressionFunction<any>): Operation<CreateResult>;
|
||||
@@ -247,6 +256,7 @@ declare module "rethinkdb" {
|
||||
get<TObjectType extends object>(key: string): Operation<TObjectType | null> & Writeable;
|
||||
getAll(key: string, index?: Index): Sequence; // without index defaults to primary key
|
||||
getAll(...keys: string[]): Sequence;
|
||||
getIntersecting(geometry: Geometry, index: Index): Sequence;
|
||||
wait(WaitOptions?: WaitOptions): WaitResult;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user