ReviewOS

also looking at this

stacks/dtsx

fix(emit): keep a */ in a default value from closing its JSDoc

#3118
Open mkantautas wants to merge fix/defaultvalue-comment-close into main
3 files +38 -2
packages/dtsx/src/processor/declarations.tsmodified+2-1
Changes to packages/dtsx/src/processor/declarations.ts
@@ -4,7 +4,7 @@
44
55import type { Declaration } from '../types'
66import { formatComments } from './comments'
7import { consumeCleanDefault, enableCleanDefaultCollection, extractSatisfiesType, inferNarrowType, isGenericType } from './type-inference'
7import { consumeCleanDefault, enableCleanDefaultCollection, escapeCommentEnd, extractSatisfiesType, inferNarrowType, isGenericType } from './type-inference'
88
99/**
1010 * Format a @defaultValue tag as a standalone JSDoc block
@@ -183,6 +183,7 @@ export function processVariableDeclaration(decl: Declaration, keepComments: bool
183183 }
184184
185185 result += `: ${typeAnnotation};`
186 defaultTag = escapeCommentEnd(defaultTag)
186187
187188 // Skip generated @defaultValue if user already has one
188189 if (defaultTag && comments && comments.includes('@defaultValue')) {