mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-27 14:30:49 +08:00
Point and Polygon functions for RethinkDb Geometry
This commit is contained in:
11
types/rethinkdb/index.d.ts
vendored
11
types/rethinkdb/index.d.ts
vendored
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user