typia 13.0.0-dev.20260520 → 13.0.0-dev.20260521.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -201,13 +201,52 @@ func metadata_js_doc_parameter_name(tag *nativeast.Node) string {
201
201
  if tag.Kind.String() != "KindJSDocParameterTag" && tag.Kind.String() != "KindJSDocPropertyTag" {
202
202
  return ""
203
203
  }
204
- // `name` is a DeclarationName: typically an Identifier, but for nested
205
- // JSDoc parameter names like `@param obj.field description` the parser
206
- // produces a QualifiedName, and upstream's (*Node).Text() panics with
207
- // `Unhandled case in Node.Text: *ast.QualifiedName` if we call .Text()
208
- // directly. NodeText in the ttsc shim covers QualifiedName and any
209
- // other DeclarationName Kind that upstream's switch doesn't.
210
- return nativeast.NodeText(tag.AsJSDocParameterOrPropertyTag().Name())
204
+ name := tag.AsJSDocParameterOrPropertyTag().Name()
205
+ if name == nil {
206
+ return ""
207
+ }
208
+ return metadata_js_doc_name_text(name)
209
+ }
210
+
211
+ func metadata_js_doc_name_text(node *nativeast.Node) string {
212
+ if text := metadata_node_source_text(node); text != "" {
213
+ return text
214
+ }
215
+ if node == nil {
216
+ return ""
217
+ }
218
+ if node.Kind == nativeast.KindQualifiedName {
219
+ name := node.AsQualifiedName()
220
+ if name == nil {
221
+ return ""
222
+ }
223
+ left := metadata_js_doc_name_text(name.Left)
224
+ right := metadata_js_doc_name_text(name.Right)
225
+ if left == "" {
226
+ return right
227
+ }
228
+ if right == "" {
229
+ return left
230
+ }
231
+ return left + "." + right
232
+ }
233
+ return node.Text()
234
+ }
235
+
236
+ func metadata_node_source_text(node *nativeast.Node) string {
237
+ if node == nil {
238
+ return ""
239
+ }
240
+ file := nativeast.GetSourceFileOfNode(node)
241
+ if file == nil {
242
+ return ""
243
+ }
244
+ source := file.Text()
245
+ start, end := node.Pos(), node.End()
246
+ if start < 0 || end > len(source) || start >= end {
247
+ return ""
248
+ }
249
+ return strings.TrimSpace(source[start:end])
211
250
  }
212
251
 
213
252
  func metadata_js_doc_type_expression_text(tag *nativeast.Node) string {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typia",
3
- "version": "13.0.0-dev.20260520",
3
+ "version": "13.0.0-dev.20260521.1",
4
4
  "description": "Superfast runtime validators with only one line",
5
5
  "main": "lib/index.js",
6
6
  "exports": {
@@ -44,8 +44,8 @@
44
44
  "commander": "^10.0.0",
45
45
  "inquirer": "^8.2.5",
46
46
  "randexp": "^0.5.3",
47
- "@typia/interface": "^13.0.0-dev.20260520",
48
- "@typia/utils": "^13.0.0-dev.20260520"
47
+ "@typia/interface": "^13.0.0-dev.20260521.1",
48
+ "@typia/utils": "^13.0.0-dev.20260521.1"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@rollup/plugin-commonjs": "^29.0.0",