You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It just hit me what the change is: the files from addons are validated as part of the build as they are placed inside frontend/generated/jar-resources. That folder should be excluded as you cannot change the code in the addons
I am facing the same issue in a multi module project I am working on.
During the build I get a lot of Parameter implicitly has an 'any' type. errors.
The files with the errors always come from "frontend/generated/jar-resources/src".
The errors are actually true but they are not shown on the real files ("META-INF/resources/frontend/src") neither in VS Code nor during the build.
When I (accidentally) open one of the generated files in VS Code, the error is shown there too, so it seems like a different tsconfig.json is used for the "real" files and the generated files.
Activity
Artur- commentedon Dec 14, 2022
So what has changed as the options are still the same? Is it because of upgrading Typescript from 4.7 to 4.9?
feat: added method to get authenticate principal name
javier-godoy commentedon Dec 14, 2022
It seems so, although I cannot fully parse the TypeScript release notes.
Spelling out the details for one of the example cases I mentiones above:
flow-15485from FlowingCode/FontAwesomeIronIconset (pom has vaadin 23.2.10)git clone -b flow-15485 git@github.com:FlowingCode/FontAwesomeIronIconset.gitRun the demo application
mvn jetty:run, open http://127.0.0.1:8080/ --> the application starts, no errors 🙂mvn vaadin:danceEdit pom and set 23.3.0
Delete tsconfig.json so that it's recreated with defaults.
mvn jetty:run, open http://127.0.0.1:8080/ --> the application starts, there are some errors 🙁https://github.com/FlowingCode/FontAwesomeIronIconset/blob/flow-15485/src/test/resources/META-INF/resources/frontend/fc-font-awesome-gallery.ts#L9-L19
https://github.com/FlowingCode/FontAwesomeIronIconset/blob/flow-15485/src/test/resources/META-INF/resources/frontend/fc-font-awesome-gallery.ts#L67-L71
https://github.com/FlowingCode/FontAwesomeIronIconset/blob/9a7597b9092ffb382577fba1ac04a7e8662a08a5/src/test/resources/META-INF/resources/frontend/fc-font-awesome-gallery.ts#L79
rm -rf frontend/generated
Edit tsconfig.json and set
"noImplicitAny": falseand"strictPropertyInitialization": falsemvn jetty:run, open http://127.0.0.1:8080/ --> the application starts, there are less errors 🤨Edit tsconfig.json and set
"strictNullChecks": false(https://stackoverflow.com/a/57563877/1297272)Run the demo application
mvn jetty:run, open http://127.0.0.1:8080/ --> the application starts, no errors 🙂Artur- commentedon Dec 14, 2022
It just hit me what the change is: the files from addons are validated as part of the build as they are placed inside frontend/generated/jar-resources. That folder should be excluded as you cannot change the code in the addons
chore: version tsconfig.json
chore: version tsconfig.json
probert94 commentedon Jan 4, 2023
I am facing the same issue in a multi module project I am working on.
During the build I get a lot of
Parameter implicitly has an 'any' type.errors.The files with the errors always come from "frontend/generated/jar-resources/src".
The errors are actually true but they are not shown on the real files ("META-INF/resources/frontend/src") neither in VS Code nor during the build.
When I (accidentally) open one of the generated files in VS Code, the error is shown there too, so it seems like a different tsconfig.json is used for the "real" files and the generated files.
fix: Do not perform type checking for TS files from jar files
Artur- commentedon Jan 17, 2023
@probert94 Try adding
to your tsconfig.json. This is also what is done in #15700 for future versions
Artur- commentedon Jan 31, 2023
It seems like
"exclude"only works if you do not reference the files from any code... which kind of is not what ever happensfix: Do not perform type checking for TS files from jar files
fix: Do not perform type checking for TS files from jar files
Artur- commentedon Jan 31, 2023
Now I am confused because #15700 does seem to work..
javier-godoy commentedon Jan 31, 2023
Just noting that I applied the workaround in a couple of projects and addons, and it works fine.
fix: Do not perform type checking for TS files from jar files (#15700)
fix: Do not perform type checking for TS files from jar files (#15700)
fix: Do not perform type checking for TS files from jar files (#15700)
fix: Do not perform type checking for TS files from jar files (#15700)…
vaadin-bot commentedon Feb 3, 2023
This ticket/PR has been released with Vaadin 24.0.0.alpha10 and is also targeting the upcoming stable 24.0.0 version.
vaadin-bot commentedon Feb 9, 2023
This ticket/PR has been released with Vaadin 23.3.6.