Closed hhkaos closed 11 months ago
I'm trying and maybe this would be even better:
{
"compilerOptions": {
"module": "amd", // output files as AMD modules
"sourceMap": true,
"target": "es2019",
"esModuleInterop": true
}
}
Does it have any problem? I'm new with TS 😄
I just opened an issue to better doc the minimum req's for TS in the System Requirements doc. Targeting es2019 or higher
is currently what we recommend and we'll doc that.
@hhkaos I think we probably want to keep the jsxFactory and jsx options for those doing widget development but I do think the shorter snippet with es2019 looks good and we should update to that.
Great Kelly, I just added the jsxFactory
and updated the contributing.md with some of the things we discussed 😄 .
I just realized the current![Screenshot 2021-07-20 at 19 52 19](https://user-images.githubusercontent.com/826965/126372670-117c437b-c57a-448f-804b-1014d028db47.png)
tsConfig
snippet has some typos (missing commas):So I fixed it.
Then I tried to make it work but I got this:![Screenshot 2021-07-20 at 19 52 57](https://user-images.githubusercontent.com/826965/126372765-9c8bd5e1-13ff-48d8-81b1-510ac4022c0f.png)
I have used another version https://github.com/Esri/jsapi-resources/blob/master/4.x/typescript/demo/tsconfig.json which seems to be similar but with a different target, but it worked for me. Am I doing something wrong?, should we change the target.
Then the![Screenshot 2021-07-20 at 20 03 52](https://user-images.githubusercontent.com/826965/126374534-042e5cd3-457c-4aa8-94dc-0e55d14ac68d.png)
tsConfigBasic
didn't work for me either:So I proposed replaced it with `"target": "es2019",' which fixed it to me.
Cheers!