Generator for UI5-based web-apps which use the official UI5 tooling and support multiple deployment targets such as the SAP Business Technology Platform
Apache License 2.0
33
stars
25
forks
source link
Allow usage of Promises when using code assist #39
When generating a project with code assist, the following error is shown, when you're using promises:
any 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.ts(2585)
I think, it should be easily possible to use Promises, especially after IE11 support is dropped. To solve this issue the tsconfig.json has to be changed:
Important: The eslint.rc file should have the following config, otherwise we will receive another error:
{
"env": {
"es6": true
},
This PR does not contain the necessary change in the eslint.rc, because this change comes with the PR #31.
So if you like you can wait with merging this one, until #31 is resolved. Or you merge this one now, because the devs will receive just a different error message than they currently do. So no big difference.
Hi!
When generating a project with code assist, the following error is shown, when you're using promises:
any 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.ts(2585)
I think, it should be easily possible to use Promises, especially after IE11 support is dropped. To solve this issue the
tsconfig.json
has to be changed:Important: The
eslint.rc
file should have the following config, otherwise we will receive another error:This PR does not contain the necessary change in the
eslint.rc
, because this change comes with the PR #31.So if you like you can wait with merging this one, until #31 is resolved. Or you merge this one now, because the devs will receive just a different error message than they currently do. So no big difference.
BR, Lukas