I want to create a new graphic type how ever the lastest https://developers.arcgis.com/javascript/latest/implementing-accessor/ instruction can't be follow because there is not ES module version.
Is there any guidance on how to proceed?
Solved! Go to Solution.
HI @Alexandre-Notos, the API functionality is exactly the same and for the TypeScript code you'll need to swap out AMD module paths with ES modules paths and turn the commonjs require statements into import statements.
HI @Alexandre-Notos, the API functionality is exactly the same and for the TypeScript code you'll need to swap out AMD module paths with ES modules paths and turn the commonjs require statements into import statements.
@AndyGup Thanks for the info. I manage to find the right path.
Now in the following code is it possible to change the
import Graphic from "@arcgis/core/Graphic"; import { subclass, property } from "@arcgis/core/core/accessorSupport/decorators"; import GraphicsLayer from "@arcgis/core/layers/GraphicsLayer"; @subclass("esri.core.Graphic.SegmentGraphic") export class SegmentGraphic extends Graphic{ @property() startPoint: GraphicsLayer; @property() endPoint: Graphic; constructor(properties?: any) { super(properties); this.startPoint = properties.startPoint; this.endPoint = properties.endPoint; } }