AnsweredAssumed Answered

v4.10 - extend BaseLayerView2D in typescript

Question asked by ncameron on Jan 7, 2019
Latest reply on Jan 8, 2019 by ncameron

Hi,

 

In 4.9 extending a BaseLayerView2D was simple as in the following:

import BaseLayerView2D = require("esri/views/2d/layers/BaseLayerView2D");

class ExtendedLayerView extends BaseLayerView2D {

   // implementation...

}

 

In 4.10 the typings have changed so that BaseLayerView2D is an interface instead of a class, therefore extends won't work.

 

Have only worked out a very hacky way to call createSubclass to make it work...but lose all static typing with the class then as well.

 

Any ideas how to correctly extend BaseLayerView2D using v4.10 typings? 

Thanks!

Outcomes