This repository contains resources to support the Esri Developer Summit presentation, Angular and the ArcGIS API for JavaScript. Here you will find all of the samples apps, presentation slides, and Readme files that provide guidance for each pattern.
27
stars
12
forks
source link
problem accessing esri types in multi-app repo structure #18
Hi @andygup. There might be another small hiccup to figure out with ts's knowledge of types in our current multi-app configuration in this repo.
Right now, in an esri-map.component.ts I'm getting a ts error that [ts] Cannot find name '__esri'. If I go to the sample app's top-level tsconfig.json (e.g.: /samples/1-app-scaffolding/tsconfig.json) and adjust the "typeRoots" json property from
"typeRoots": [
"node_modules/@types"
],
to
"typeRoots": [
"../../node_modules/@types"
],
then we seem to be back in business.
And no, in my environment, "./node_modules/@types" doesn't seem to fix it. Doesn't this strict 2-levels-up "typeRoots" seem brittle and unsustainable? It'll be fine for our needs over the next several weeks, but it feels weird leaving it like this.
Hi @andygup. There might be another small hiccup to figure out with ts's knowledge of types in our current multi-app configuration in this repo.
Right now, in an
esri-map.component.ts
I'm getting a ts error that[ts] Cannot find name '__esri'.
If I go to the sample app's top-level tsconfig.json (e.g.:/samples/1-app-scaffolding/tsconfig.json
) and adjust the"typeRoots"
json property fromto
then we seem to be back in business.
And no, in my environment,
"./node_modules/@types"
doesn't seem to fix it. Doesn't this strict 2-levels-up "typeRoots" seem brittle and unsustainable? It'll be fine for our needs over the next several weeks, but it feels weird leaving it like this.What do you think?