-
-
Notifications
You must be signed in to change notification settings - Fork 427
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
export from script setup sugar showing error in editor. #34
Comments
Hi @soulsam480, what is your vue version? if you using [email protected] or new, I you are using [email protected] or old, please change vscode setting But in the future, old |
Hii, I'm using [email protected]. Ok sure then, I'll check |
Just removed the export and now it shows |
this error is not from volar, I think eslint may not support new |
Ohh sure. Also I just noticed that without the export, the data is not being exposed to template. I mean not being accessible from the remplate during render. I'll just check in Vue 3 issues. |
you don't need export in new |
I think this is an issue though. I am using
...but I actually need the export so that I can use the interface somewhere else. |
@schw4rzlicht try: <script lang="ts">
export interface ComponentProps {
myProps: string;
}
</script>
<script lang="ts" setup>
defineProps<ComponentProps>();
</script> |
This helps in some cases. But I just found another one not working: <script lang="ts">
import { PlayerError } from "./errors/PlayerError";
export interface ErrorViewProps {
error: PlayerError;
}
export interface ErrorViewEmits {
(e: "retry"): void;
}
</script>
<script lang="ts" setup>
const props = defineProps<ErrorViewProps>();
defineEmits<ErrorViewEmits>();
</script> This one fails with:
In this case, I don't even need
But I need declarations as I am building a library :( |
@schw4rzlicht could you provide minimal reproduction? |
Hii @johnsoncodehk ,
So recently while using volar in a project, I got an error saying
Modifiers cannot appear here.ts(1184)
.This came from the following code. Please have a look.
I'm actually not sure if it's a problem with volar or vue. Also this is not throwing any error in dev server or while rendering. Please have a look!
The text was updated successfully, but these errors were encountered: