UNPKG

@tai-kun/surrealdb

Version:

The SurrealDB SDK for JavaScript

31 lines 1.35 kB
import { GeometryPointBase as Base, type GeometryPointSource, type GeometryPointTypes } from "@tai-kun/surrealdb/decodeonly-datatypes"; import { type CoordValue } from "../_internals/geometry"; import { CBOR_TAG_GEOMETRY_POINT, type Encodable } from "./spec"; export type { GeometryPointSource, GeometryPointTypes }; export type GeoJsonPoint = { type: "Point"; coordinates: [x: number, y: number]; }; export declare class GeometryPointBase<TTypes extends GeometryPointTypes> extends Base<TTypes> implements Encodable { get x(): CoordValue<TTypes["Coord"]>; get y(): CoordValue<TTypes["Coord"]>; get coordinates(): readonly [ x: CoordValue<TTypes["Coord"]>, y: CoordValue<TTypes["Coord"]> ]; toCBOR(): [tag: typeof CBOR_TAG_GEOMETRY_POINT, value: this["point"]]; toJSON(): GeoJsonPoint; toSurql(): string; toPlainObject(): { type: "Point"; point: readonly [x: CoordValue<TTypes["Coord"]>, y: CoordValue<TTypes["Coord"]>]; }; } /** * [API Reference](https://tai-kun.github.io/surrealdb.js/v2/api/data/geometry-point) */ export declare class GeometryPoint extends GeometryPointBase<GeometryPointTypes<typeof Number>> { static readonly Coord: NumberConstructor; constructor(source: GeometryPointSource<typeof GeometryPoint>); } //# sourceMappingURL=geometry-point.d.ts.map