diff --git a/types/rethinkdb/index.d.ts b/types/rethinkdb/index.d.ts index 4ef00ecb09..038a9d48e6 100644 --- a/types/rethinkdb/index.d.ts +++ b/types/rethinkdb/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for RethinkDB 2.3 // Project: http://rethinkdb.com/ -// Definitions by: Alex Gorbatchev +// Definitions by: Alex Gorbatchev , Adrian Farmadin // 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 { indexCreate(name: string, index?: ExpressionFunction): Operation; @@ -247,6 +256,7 @@ declare module "rethinkdb" { get(key: string): Operation & 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; }