Actually, for uxp
, but I found this repo GitHub · Where software is built, which supposedly solves this issue, but I am still unable to get type hints in VSCode for the .psjs
files.
My jsconfig.js
looks as follows
{
"compilerOptions": {
"typeRoots": [
"node_modules/@adobe/cc-ext-uxp-types"
],
},
"typeAcquisition": {
"include": ["uxp"]
}
}
I installed @adobe/cc-ext-uxp-types
with npm install -D @adobe/cc-ext-uxp-types
(or even without -D
, so as a non-development dependency), so these definitions were installed for my current project inside the project’s node_modules
.
My package.json
looks like
{
"name": "my-package",
"version": "0.1.0",
"description": "Some script",
"main": "myscript.psjs",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Me",
"license": "ISC",
"type": "module",
"dependencies": {
"@adobe/cc-ext-uxp-types": "^7.3.1"
}
}
But I still don’t get autocompletions in my myscript.psjs
. file, but I do get autocompletions for .jsx
files for uxp
. All files are in the root of the project. So I tried to add a file association to my VSCode settings
"files.associations": {
"*.psjs": "javascriptreact"
},
Or even "javascript"
instead of "javascriptreact"
, but this doesn’t solve the problem.
Any idea how to solve this?