5

I have a openui project setup in visual studio code 1.2/1.3 and all the required libraries (openui runtime files) are inside /resources directory and in .js format. I am not getting any intellisense from these libraries. I have setup my jsconfig.json as follows. Can anyone help me on how to get the intellisense for the same.

Jsconfig.json:

{
"compilerOptions": {
    "target": "ES6"
},
"files": [
    "/resources/sap/m/*",
    "resources/sap/ui/*"
 ]
}
Dinesh
  • 101
  • 1
  • 6

2 Answers2

2

In my example it worked that I only added "@types/openui5": "^1.40.1" as a dev Dependency to my package.json. VSCode auto detects it when it is installed via npm or yarn and provides the auto completion. I'm using VSCode 1.17 btw. Example: VSCode UI5 auto completion example

Max Schmitt
  • 2,529
  • 1
  • 12
  • 26
0
npm init

to generate package.json, if not already present

npm i @types/openui5

to add the openui5 types as dependency (not sure if the module npm @types is requrired). This enable the type completions for .js and support for the .xml views.

i000174
  • 1,107
  • 10
  • 15