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
I'm using Vite with Vue 3. Vue exports a function named readonly which returns a wrapped Readonly type. Using it as a return-type with ReturnType<typeof readonly> throws an error Unexpected ">".
I think the problem here is the reservedreadonly keyword in interfaces for example because it works when I rename it in the import (import { readonly as readOnly } from 'vue').
Is this a problem with esbuild or maybe a bug in Vite itself?
The text was updated successfully, but these errors were encountered:
Thanks for reporting this. It's definitely a bug with esbuild. The problem is that for typeof readonly, the readonly identifier is incorrectly treated as a type operator. I'll fix this shortly.
Hey!
I'm using Vite with Vue 3. Vue exports a function named
readonly
which returns a wrappedReadonly
type. Using it as a return-type withReturnType<typeof readonly>
throws an errorUnexpected ">"
.I think the problem here is the reserved
readonly
keyword in interfaces for example because it works when I rename it in the import (import { readonly as readOnly } from 'vue'
).Is this a problem with esbuild or maybe a bug in Vite itself?
The text was updated successfully, but these errors were encountered: