-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intellisense shows non existent errors (double created variables) #112
Comments
I know of the issue, but I don't know how to resolve it. The problem appears, because of the include settings in "include": [
"scripts/global/**/*.js",
"scripts/global/**/*.ts",
".iobroker/types/javascript.d.ts"
], then the compiler does not compile the script at all and all defintions defined in My solution for this problem is using an anonymous function in every script, which is directly executed. Example: (() => {
// Add your code in here
})(); This approach is more like a workarround, but for its a good enough solution. |
Unfortunately, I am not a pro about these kind of "deep" topics. Therefore, I cannot help about further workarounds. Maybe, some ioBroker experts could help? |
I just found out about Project References in Typescript: https://www.typescriptlang.org/docs/handbook/project-references.html These might be the solution to the problem, but I'm not sure about it yet. If I find some time I will have a deeper look into the topic. |
It would be really appreciated. At the moment I don't like to use vscode cause of this intellisense issue. Thanks for your effort. |
Describe the bug
Intellisense shows error messages if variables with same names are declared in multiple scripts.
To Reproduce
Create two scripts with same variable names. Not all double declared variables are shown as an error. I got two copies from same script, but not all variables are marked as double-created.
Expected behavior
There should not be errors at all
Screenshots
Version information (please complete the following information):
The text was updated successfully, but these errors were encountered: