File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed
Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 33
44import { Buffer } from 'node:buffer'
55
6- export function printCodeWithSourceMap ( code : string , result : any ) {
6+ export function printCodeWithSourceMap ( code : string , result : any ) : void {
77 const codeWithMap = `\n\n${
88 result . code
99 } \n//# sourceMappingURL=data:application/json;base64,${ Buffer . from (
Original file line number Diff line number Diff line change @@ -364,8 +364,11 @@ export function createFakeJsPlugin({
364364 const declarationId = declarationIdNode . value
365365 const declaration = getDeclaration ( declarationId )
366366
367- walkAST ( declaration . decl , {
367+ walkAST < t . Node | t . Comment > ( declaration . decl , {
368368 enter ( node ) {
369+ if ( node . type === 'CommentBlock' ) {
370+ return
371+ }
369372 delete node . loc
370373 } ,
371374 } )
@@ -435,7 +438,6 @@ export function createFakeJsPlugin({
435438 }
436439
437440 const result = generate ( file , {
438- comments : true ,
439441 sourceMaps : sourcemap ,
440442 sourceFileName : chunk . fileName ,
441443 } )
Original file line number Diff line number Diff line change @@ -364,8 +364,8 @@ declare function fn(): number;
364364 */
365365interface Options {
366366 /**
367- * interface member
368- */
367+ * interface member
368+ */
369369 foo : string ;
370370}
371371/**
You can’t perform that action at this time.
0 commit comments