File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/svelte/scripts/process-messages Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -98,9 +98,7 @@ function run() {
9898 . readFileSync ( new URL ( `./templates/${ name } .js` , import . meta. url ) , 'utf-8' )
9999 . replace ( / \r \n / g, '\n' ) ;
100100
101- /**
102- * @type {any[] }
103- */
101+ /** @type {import('acorn').Comment[] } */
104102 const comments = [ ] ;
105103
106104 let ast = acorn . parse ( source , {
@@ -143,7 +141,9 @@ function run() {
143141 const template_node = ast . body [ index ] ;
144142 ast . body . splice ( index , 1 ) ;
145143
146- const jsdoc = comments . findLast ( ( comment ) => comment . start < template_node . start ) ;
144+ const jsdoc = /** @type {import('acorn').Comment } */ (
145+ comments . findLast ( ( comment ) => comment . start < template_node . start )
146+ ) ;
147147
148148 const printed = esrap . print (
149149 ast ,
You can’t perform that action at this time.
0 commit comments