-
-
Notifications
You must be signed in to change notification settings - Fork 258
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
feat(vite-plugin-angular): fix .ts typechecking and add disableTypeChecking option #1538
Conversation
✅ Deploy Preview for analog-blog ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for analog-app ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for analog-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
if (disableTypeChecking) { | ||
// Syntax errors are cheap to compute and the app will not run if there are any | ||
// So always show these types of errors regardless if type checking is disabled | ||
return syntacticDiagnostics; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This matches the behaviour of the angular cli where disabling typechecking only disables semantic diagnostics:
https://github.com/angular/angular-cli/blob/9b57ff0552736e6fef44c0ff7e6535f9ed832c6b/packages/angular/build/src/tools/esbuild/angular/compiler-plugin.ts#L378C90-L378C98
✅ Deploy Preview for analog-ng-app ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
…ecking option Fixes analogjs#1532
PR Checklist
Closes #1532
What is the new behavior?
Fixes typechecking of .ts files (implementation borrowed from the angular CLI). Currently only component templates are typechecked.
As this has the potential to impact performance, we also add a
disableTypeChecking
option to disable typechecking completely (so that folks can runngc --noEmit
to typecheck separately)Does this PR introduce a breaking change?
Other information
[optional] What gif best describes this PR or how it makes you feel?