-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
🐛 BUG: Can't stop typescript errors #706
Comments
Astro is TypeScript only at this time, TypeScript cannot be disabled. Nonetheless, yes, I believe that option should be working |
Instead of |
We'd rather make that option work if that's a possibility |
Is there any workaround until fixed? Disruptive for developing and causes to miss important errors because so many things are underlined in red. Even every access under Astro.locals complains with error that property doesn't exist. |
@Princesseuh Can it be P1 bug? There are so many error everywhere. I can give more example. Cannot trust errors in IDE anymore because most of them are because of this extension instead of real problems with code. Trusting errors is more than nice to have I believe, it's very frustrating developer experience. |
TypeScript errors are real errors.. I'm sorry this is affecting your experience so much, but it's a niche issue, people typically use TypeScript just fine. You can use |
This is opinion and objectively wrong. There are many example that run and build fine but this extension still complain with error. Rule of thumb is if it runs without error in astro and browser it's not an error.
People typically use javascript just fine. It is allowed to write vanilla javascript in astro and everyone should respect right to choose for own code. |
Fixed by volarjs/services@6f13b47, we'll release an update with it soon-ish |
Is it in 2.6.2? |
Nope, not yet sorry. There was an unexpected delay, unfortunately. The holidays period also delayed things a fair amount. Still definitely planned, though! |
Is it in 2.7.1? |
Yes, it should work now! |
I still have typescript errors like |
@Princesseuh working for you? |
Ah, it only seems to be working for certain kinds of errors, I'll take a look. Sorry for the inconvenience. |
@Princesseuh can you open this issue? |
I'll open an issue on the upstream project instead, since the code for this isn't in this repo |
@Princesseuh where to find that issue number? |
Describe the Bug
Can't stop typescript errors appearing.
Steps to Reproduce
Front matter
optional
is underlined in red and hovering explains errorProperty 'optional' does not exist on type '{ required: string; optional?: undefined; }'.ts(2339)
I tried to disable validation with
"checkJs": false
in jsconfig.json and"typescript.validate.enable": false
in settings but it doesn't stop errors.No error putting that code in .js file but error still in .astro file.
Using typescript is not requirement for astro so should not be required to write any typescript to stop these errors. They shouldn't appear if typescript checks are disabled.
The text was updated successfully, but these errors were encountered: