Hi Ryan Gatchell thank you for explaining! I am afraid I'm still not getting it to work. I installed the tpyings in npm. I am using the Esri Loader template from Git. I just installed everything so it is the latest versions; and I updated all packages with NPM's NCU updater. The reason I am hoping to use it is to use the old 'dnd Moveable' to make popups moveable again in API 4.x.
Here is my tsconfig. I also experimented and removed temporarily the "node_modules". And it's in package.json in devdependencies and I even experimented adding it to dependencies though I don't it is needed for run time.
Thoughts??? This is my first foray into Typescript, API 4 etc.
{
"compilerOptions": {
"module": "amd",
"noImplicitAny": true,
"esModuleInterop": true,
"sourceMap": true,
"jsx": "react",
"jsxFactory": "tsx",
"target": "es5",
"experimentalDecorators": true,
"preserveConstEnums": true,
"suppressImplicitAnyIndexErrors": true,
"importHelpers": true,
"moduleResolution": "node"
},
"include": [
"./app/*",
"./node_modules/@types/arcgis-js-api/*",
"../node_modules/dojo-typings/dojo/1.11/modules.d.ts",
"../node_modules/dojo-typings/dijit/1.11/modules.d.ts",
"../node_modules/dojo-typings/dojox/1.11/modules.d.ts"
],
"exclude": [
"node_modules"
]
}
I even put ///<reference path= '../node_modules/dojo-typings/dojo/1.11/dnd.d.ts' /> at the top of my main.js file. Here is the top of my main.js file:
import EsriMap from "esri/Map";
import MapView from "esri/views/MapView";
import FeatureLayer from "esri/layers/FeatureLayer";
import MapImageLayer from "esri/layers/MapImageLayer";
import LayerList from "esri/widgets/LayerList";
import Popup from "esri/widgets/Popup";
import PopupTemplate from "esri/PopupTemplate";
import Sublayer from "esri/layers/support/Sublayer";
import esri = __esri;
import Moveable from "dojo-typings/dojo/1.11/dnd";
import On from "dojo-typings/dojo/1.11/on";
import domClass from "dojo-typings/dojo/1.11/dom-class"
const map = new EsriMap({
basemap: "streets-vector",
layers: []
});