Bug Number BUG-000100264
Submitted Oct 21, 2016
Modified Jun 11, 2020
Severity Medium
Applies To ArcGIS API for JavaScript
Version Found 4.1
Prog Language N/A
Server Platform Windows 7.0 64 Bit
Client Platform Windows 7.0 64 Bit
Database N/A
Locale N/A
Status Not in Current Product Plan
Version Fixed
SP Fixed

Bug BUG-000100264


Classes cannot be extended in ArcGIS API for JavaScript 4.1.

Additional Information

Problem is with how the custom class was created, it should read define(["esri/core/declare", "esri/Graphic"],function (declare, graphic) { return declare([graphic],{ declaredClass: "CustomGraphic" }); }); NOTE -> the declaredClass:"CustomGraphic" line that was added. Once this is in there, it works. This should be used in all extended classes. Doc will be updated to reflect this and hopefully alleviate any future confusion.

Alternate Solution