@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
42 lines (40 loc) • 1.29 kB
TypeScript
import type { JSONSupport } from "../../core/JSONSupport.js";
import type { TimeUnit as TimeUnits } from "../../core/units.js";
export interface TimeUnitProperties extends Partial<Pick<TimeUnit, "time" | "units">> {}
/**
* A geoprocessing object that contains time information.
*
* @since
* 5.0
* const [Geoprocessor, TimeUnit] = await $arcgis.import([
* "@arcgis/core/rest/Geoprocessor.js",
* "@arcgis/core/rest/support/TimeUnit.js",
* ]);
* const parameters = {
* Input_Time: new TimeUnit({
* time: 2,
* units: "esriTimeUnitsWeeks",
* }),
* };
* const geoprocessor = new Geoprocessor({});
* geoprocessor.submitJob(parameters).then((result) => {
* // handle the result
* });
* @see
* [geoprocessor](https://developers.arcgis.com/javascript/latest/references/core/rest/geoprocessor/)
* > [!WARNING]
* >
* > The string representation of `GPTimeUnit` is not supported.
* @see [GPTimeUnit](https://developers.arcgis.com/rest/services-reference/enterprise/gp-data-types/#gptimeunit)
*/
export default class TimeUnit extends JSONSupport {
constructor(properties?: TimeUnitProperties);
/**
* Specifies the numerical time.
*
* @default 0
*/
accessor time: number;
/** Specifies the unit of time. */
units?: TimeUnits | null;
}