Skip to content
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

Support JSDoc for script setup #1327

Closed
xiaoxiangmoe opened this issue May 22, 2022 · 2 comments
Closed

Support JSDoc for script setup #1327

xiaoxiangmoe opened this issue May 22, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@xiaoxiangmoe
Copy link
Collaborator

<script setup lang="ts">
import Vue from 'vue';
console.log(Vue);
</script>
<script lang="ts">
/** JSDoc for component */
export default {};
</script>

The generated virtual file is:

/** JSDoc for component */


import Vue from 'vue';
export default await (async () => {
console.log(Vue);
// @ts-ignore
return (await import('vue')).defineComponent({
...({}),
setup() {
() => {
};
return {
};
},
});
})();

JSDoc for export default move into wrong place

@johnsoncodehk johnsoncodehk added the enhancement New feature or request label May 22, 2022
@kamenkolev-shared
Copy link

I'm not sure why this was closed, but it doesn't seem to work.

Tested with:
Volar 1.0.9
Typescript 4.8.4

Default setup as shown in Getting Started

image

@johnsoncodehk
Copy link
Member

johnsoncodehk commented Nov 29, 2022

@kamenkolev-shared this is a different issue and fixed by 04863b0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants