@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
44 lines (37 loc) • 1.06 kB
TypeScript
/**
* Quantity type used to represent measurements across the JS API.
*
* @since 4.23
*/
import type { LengthUnit, AreaUnit, VolumeUnit, AngleUnit } from "./units.js";
export interface ScalarQuantity {
/** Scalar value */
readonly value: number;
}
export interface Length extends ScalarQuantity {
/** Unit type. */
readonly type: "length";
/** Any unit which represents length. */
readonly unit: LengthUnit;
}
export interface Area extends ScalarQuantity {
/** Unit type. */
readonly type: "area";
/** Any unit which represents area. */
readonly unit: AreaUnit;
}
export interface Volume extends ScalarQuantity {
/** Unit type. */
readonly type: "volume";
/** Any unit which represents volume. */
readonly unit: VolumeUnit;
}
export interface Angle extends ScalarQuantity {
/** Unit type. */
readonly type: "angle";
/** Any unit which represents an angle. */
readonly unit: AngleUnit;
}
/** @internal */
export type Quantity = Length | Area | Volume | Angle;
export type RotationType = "geographic" | "arithmetic";