can not find "esri/widgets/support/interfaces"

575
1
Jump to solution
09-11-2021 10:26 AM
MariaGomez06
New Contributor

hi,

I am looking at widgets that are published on github (https://github.com/Esri/arcgis-js-api/tree/4master/widgets) to figure out how they work.

in most of widgets , a class named VNode that is not available in index.d.ts file ( made by installing 

npm install --save @types/arcgis-js-api ).

 

// esri.widgets.support
import { VNode } from "esri/support/interfaces";
 

and when I import it in my codes,  I encounter with a type declaration error.(Cannot find module 'esri/support/interfaces' or its corresponding type declarations)

how to solve this error? 

 

 
 
 

 

0 Kudos
1 Solution

Accepted Solutions
ReneRubalcava
Frequent Contributor

Those types are not public and not recommended for users wanting to make custom widgets.

We are in the process of updating the custom widget guides and providing another sample in the next couple of releases.

The widget source code that is on github was only meant for users to get a better idea of how ViewModels are used, not for creating widgets or extending them.

View solution in original post

1 Reply
ReneRubalcava
Frequent Contributor

Those types are not public and not recommended for users wanting to make custom widgets.

We are in the process of updating the custom widget guides and providing another sample in the next couple of releases.

The widget source code that is on github was only meant for users to get a better idea of how ViewModels are used, not for creating widgets or extending them.