File tree 3 files changed +71
-14
lines changed
3 files changed +71
-14
lines changed Original file line number Diff line number Diff line change 36
36
"devDependencies" : {
37
37
"@vitejs/plugin-vue" : " ^4.1.0" ,
38
38
"@vitest/coverage-c8" : " ^0.29.7" ,
39
- "@volar/vue-language-core" : " ^1.6.1 " ,
39
+ "@volar/vue-language-core" : " ^1.6.3 " ,
40
40
"changelogen" : " ^0.5.1" ,
41
41
"eslint" : " ^8.36.0" ,
42
42
"eslint-config-unjs" : " ^0.1.0" ,
Original file line number Diff line number Diff line change @@ -111,8 +111,7 @@ const plugin: VueLanguagePlugin = (ctx) => {
111
111
/ ^ \. ( j s | t s | j s x | t s x ) $ / . test ( embeddedFile . fileName . replace ( fileName , "" ) )
112
112
) {
113
113
const componentBlocks = sfc . customBlocks . filter (
114
- ( b ) =>
115
- b . type === "component" && typeof ( b as any ) . attrs . name === "string"
114
+ ( b ) => b . type === "component" && typeof b . attrs . name === "string"
116
115
) ;
117
116
if ( componentBlocks . length === 0 ) {
118
117
return ;
@@ -123,7 +122,7 @@ const plugin: VueLanguagePlugin = (ctx) => {
123
122
...componentBlocks . map (
124
123
( b ) =>
125
124
`\nimport ${ pascalCase (
126
- ( b as any ) . attrs . name
125
+ b . attrs . name as string
127
126
) } from ${ JSON . stringify (
128
127
`${ fileName } __VLS_NSFC_${ b . name . slice (
129
128
"customBlock_" . length
@@ -140,7 +139,7 @@ const plugin: VueLanguagePlugin = (ctx) => {
140
139
"setup() {" ,
141
140
"return {" ,
142
141
...componentBlocks . map (
143
- ( b ) => `${ pascalCase ( ( b as any ) . attrs . name ) } ,\n`
142
+ ( b ) => `${ pascalCase ( b . attrs . name as string ) } ,\n`
144
143
)
145
144
) ;
146
145
} else {
@@ -149,7 +148,7 @@ const plugin: VueLanguagePlugin = (ctx) => {
149
148
/ c o n s t _ _ V L S _ c o m p o n e n t s O p t i o n = { / ,
150
149
"const __VLS_componentsOption = {\n" ,
151
150
...componentBlocks . map (
152
- ( b ) => `${ pascalCase ( ( b as any ) . attrs . name ) } ,\n`
151
+ ( b ) => `${ pascalCase ( b . attrs . name as string ) } ,\n`
153
152
)
154
153
) ;
155
154
}
You can’t perform that action at this time.
0 commit comments