@alloy-js/typescript 0.17.0 → 0.18.0-dev.4

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.
Files changed (99) hide show
  1. package/dist/src/builtins/node.d.ts +4 -3
  2. package/dist/src/builtins/node.d.ts.map +1 -1
  3. package/dist/src/builtins/node.js +3 -0
  4. package/dist/src/components/ArrowFunction.d.ts +4 -4
  5. package/dist/src/components/ArrowFunction.d.ts.map +1 -1
  6. package/dist/src/components/BarrelFile.d.ts +1 -1
  7. package/dist/src/components/BarrelFile.d.ts.map +1 -1
  8. package/dist/src/components/BlockScope.d.ts +1 -1
  9. package/dist/src/components/BlockScope.d.ts.map +1 -1
  10. package/dist/src/components/CallSignature.d.ts +1 -1
  11. package/dist/src/components/CallSignature.d.ts.map +1 -1
  12. package/dist/src/components/EnumDeclaration.d.ts +1 -1
  13. package/dist/src/components/EnumDeclaration.d.ts.map +1 -1
  14. package/dist/src/components/ExportStatement.d.ts +1 -1
  15. package/dist/src/components/ExportStatement.d.ts.map +1 -1
  16. package/dist/src/components/FunctionBase.d.ts +5 -5
  17. package/dist/src/components/FunctionBase.d.ts.map +1 -1
  18. package/dist/src/components/FunctionDeclaration.d.ts +4 -4
  19. package/dist/src/components/FunctionDeclaration.d.ts.map +1 -1
  20. package/dist/src/components/FunctionExpression.d.ts +4 -4
  21. package/dist/src/components/FunctionExpression.d.ts.map +1 -1
  22. package/dist/src/components/FunctionType.d.ts +3 -3
  23. package/dist/src/components/FunctionType.d.ts.map +1 -1
  24. package/dist/src/components/IfStatement.d.ts +1 -1
  25. package/dist/src/components/IfStatement.d.ts.map +1 -1
  26. package/dist/src/components/ImportStatement.d.ts +1 -1
  27. package/dist/src/components/ImportStatement.d.ts.map +1 -1
  28. package/dist/src/components/InterfaceMethod.d.ts +3 -4
  29. package/dist/src/components/InterfaceMethod.d.ts.map +1 -1
  30. package/dist/src/components/JSDoc.d.ts +1 -1
  31. package/dist/src/components/JSDoc.d.ts.map +1 -1
  32. package/dist/src/components/JSDocComment.d.ts +1 -1
  33. package/dist/src/components/JSDocComment.d.ts.map +1 -1
  34. package/dist/src/components/JSDocExample.d.ts +1 -1
  35. package/dist/src/components/JSDocExample.d.ts.map +1 -1
  36. package/dist/src/components/JSDocParam.d.ts +1 -1
  37. package/dist/src/components/JSDocParam.d.ts.map +1 -1
  38. package/dist/src/components/MemberDeclaration.d.ts +1 -1
  39. package/dist/src/components/MemberDeclaration.d.ts.map +1 -1
  40. package/dist/src/components/NewExpression.d.ts +1 -1
  41. package/dist/src/components/NewExpression.d.ts.map +1 -1
  42. package/dist/src/components/ObjectExpression.js +4 -4
  43. package/dist/src/components/PackageJson.d.ts +1 -1
  44. package/dist/src/components/PackageJson.d.ts.map +1 -1
  45. package/dist/src/components/PropertyName.d.ts +1 -1
  46. package/dist/src/components/PropertyName.d.ts.map +1 -1
  47. package/dist/src/components/Reference.d.ts +1 -1
  48. package/dist/src/components/Reference.d.ts.map +1 -1
  49. package/dist/src/components/SingleLineCommentBlock.d.ts +1 -1
  50. package/dist/src/components/SingleLineCommentBlock.d.ts.map +1 -1
  51. package/dist/src/components/SourceFile.d.ts +1 -2
  52. package/dist/src/components/SourceFile.d.ts.map +1 -1
  53. package/dist/src/components/SwitchStatement.d.ts +1 -1
  54. package/dist/src/components/SwitchStatement.d.ts.map +1 -1
  55. package/dist/src/components/TsConfigJson.d.ts +1 -1
  56. package/dist/src/components/TsConfigJson.d.ts.map +1 -1
  57. package/dist/src/components/TypeDeclaration.d.ts +1 -1
  58. package/dist/src/components/TypeDeclaration.d.ts.map +1 -1
  59. package/dist/src/components/TypeRefContext.d.ts +1 -1
  60. package/dist/src/components/TypeRefContext.d.ts.map +1 -1
  61. package/dist/src/create-package.d.ts +1 -1
  62. package/dist/src/create-package.d.ts.map +1 -1
  63. package/dist/src/index.d.ts +2 -0
  64. package/dist/src/index.d.ts.map +1 -1
  65. package/dist/src/index.js +2 -0
  66. package/dist/src/parameter-descriptor.d.ts +1 -1
  67. package/dist/src/parameter-descriptor.d.ts.map +1 -1
  68. package/dist/src/utils.js +1 -1
  69. package/dist/test/values.test.d.ts.map +1 -1
  70. package/dist/test/values.test.js +48 -1
  71. package/dist/tsconfig.tsbuildinfo +1 -1
  72. package/package.json +6 -6
  73. package/src/builtins/node.ts +4 -0
  74. package/src/components/ArrowFunction.tsx +1 -1
  75. package/src/components/CallSignature.tsx +1 -1
  76. package/src/components/FunctionBase.tsx +1 -1
  77. package/src/components/FunctionDeclaration.tsx +1 -1
  78. package/src/components/FunctionExpression.tsx +1 -1
  79. package/src/components/FunctionType.tsx +1 -1
  80. package/src/components/IfStatement.tsx +1 -2
  81. package/src/components/InterfaceMethod.tsx +1 -1
  82. package/src/components/JSDoc.tsx +1 -2
  83. package/src/components/JSDocComment.tsx +1 -1
  84. package/src/components/JSDocExample.tsx +1 -2
  85. package/src/components/JSDocParam.tsx +1 -2
  86. package/src/components/ObjectExpression.tsx +4 -4
  87. package/src/components/SingleLineCommentBlock.tsx +1 -2
  88. package/src/components/SourceFile.tsx +1 -1
  89. package/src/components/SwitchStatement.tsx +1 -2
  90. package/src/components/TypeRefContext.tsx +1 -1
  91. package/src/create-package.ts +2 -2
  92. package/src/index.ts +2 -0
  93. package/src/parameter-descriptor.ts +1 -1
  94. package/src/utils.ts +1 -1
  95. package/temp/api.json +145 -39
  96. package/test/values.test.tsx +33 -0
  97. package/tsconfig.json +2 -1
  98. package/dist/test/vitest.d.js +0 -1
  99. package/test/vitest.d.ts +0 -15
package/temp/api.json CHANGED
@@ -410,7 +410,7 @@
410
410
  },
411
411
  {
412
412
  "kind": "Content",
413
- "text": "import(\"@alloy-js/core/jsx-runtime\")."
413
+ "text": "import(\"@alloy-js/core\")."
414
414
  },
415
415
  {
416
416
  "kind": "Reference",
@@ -446,7 +446,7 @@
446
446
  },
447
447
  {
448
448
  "kind": "Content",
449
- "text": "<import(\"@alloy-js/core/jsx-runtime\")."
449
+ "text": "<import(\"@alloy-js/core\")."
450
450
  },
451
451
  {
452
452
  "kind": "Reference",
@@ -486,7 +486,7 @@
486
486
  },
487
487
  {
488
488
  "kind": "Content",
489
- "text": "import(\"@alloy-js/core/jsx-runtime\")."
489
+ "text": "import(\"@alloy-js/core\")."
490
490
  },
491
491
  {
492
492
  "kind": "Reference",
@@ -522,7 +522,7 @@
522
522
  },
523
523
  {
524
524
  "kind": "Content",
525
- "text": "<import(\"@alloy-js/core/jsx-runtime\")."
525
+ "text": "<import(\"@alloy-js/core\")."
526
526
  },
527
527
  {
528
528
  "kind": "Reference",
@@ -562,7 +562,7 @@
562
562
  },
563
563
  {
564
564
  "kind": "Content",
565
- "text": "import(\"@alloy-js/core/jsx-runtime\")."
565
+ "text": "import(\"@alloy-js/core\")."
566
566
  },
567
567
  {
568
568
  "kind": "Reference",
@@ -598,7 +598,7 @@
598
598
  },
599
599
  {
600
600
  "kind": "Content",
601
- "text": "<import(\"@alloy-js/core/jsx-runtime\")."
601
+ "text": "<import(\"@alloy-js/core\")."
602
602
  },
603
603
  {
604
604
  "kind": "Reference",
@@ -736,7 +736,7 @@
736
736
  },
737
737
  {
738
738
  "kind": "Content",
739
- "text": "import(\"@alloy-js/core/jsx-runtime\")."
739
+ "text": "import(\"@alloy-js/core\")."
740
740
  },
741
741
  {
742
742
  "kind": "Reference",
@@ -1142,7 +1142,7 @@
1142
1142
  },
1143
1143
  {
1144
1144
  "kind": "Content",
1145
- "text": "import(\"@alloy-js/core/jsx-runtime\")."
1145
+ "text": "import(\"@alloy-js/core\")."
1146
1146
  },
1147
1147
  {
1148
1148
  "kind": "Reference",
@@ -3708,7 +3708,7 @@
3708
3708
  },
3709
3709
  {
3710
3710
  "kind": "Content",
3711
- "text": "import(\"@alloy-js/core/jsx-runtime\")."
3711
+ "text": "import(\"@alloy-js/core\")."
3712
3712
  },
3713
3713
  {
3714
3714
  "kind": "Reference",
@@ -4156,7 +4156,7 @@
4156
4156
  },
4157
4157
  {
4158
4158
  "kind": "Content",
4159
- "text": "import(\"@alloy-js/core\")."
4159
+ "text": "import(\"@alloy-js/core/jsx-runtime\")."
4160
4160
  },
4161
4161
  {
4162
4162
  "kind": "Reference",
@@ -4504,7 +4504,7 @@
4504
4504
  },
4505
4505
  {
4506
4506
  "kind": "Content",
4507
- "text": "import(\"@alloy-js/core/jsx-runtime\")."
4507
+ "text": "import(\"@alloy-js/core\")."
4508
4508
  },
4509
4509
  {
4510
4510
  "kind": "Reference",
@@ -4540,7 +4540,7 @@
4540
4540
  },
4541
4541
  {
4542
4542
  "kind": "Content",
4543
- "text": "<import(\"@alloy-js/core/jsx-runtime\")."
4543
+ "text": "<import(\"@alloy-js/core\")."
4544
4544
  },
4545
4545
  {
4546
4546
  "kind": "Reference",
@@ -4580,7 +4580,7 @@
4580
4580
  },
4581
4581
  {
4582
4582
  "kind": "Content",
4583
- "text": "import(\"@alloy-js/core/jsx-runtime\")."
4583
+ "text": "import(\"@alloy-js/core\")."
4584
4584
  },
4585
4585
  {
4586
4586
  "kind": "Reference",
@@ -4616,7 +4616,7 @@
4616
4616
  },
4617
4617
  {
4618
4618
  "kind": "Content",
4619
- "text": "<import(\"@alloy-js/core/jsx-runtime\")."
4619
+ "text": "<import(\"@alloy-js/core\")."
4620
4620
  },
4621
4621
  {
4622
4622
  "kind": "Reference",
@@ -4656,7 +4656,7 @@
4656
4656
  },
4657
4657
  {
4658
4658
  "kind": "Content",
4659
- "text": "import(\"@alloy-js/core/jsx-runtime\")."
4659
+ "text": "import(\"@alloy-js/core\")."
4660
4660
  },
4661
4661
  {
4662
4662
  "kind": "Reference",
@@ -4692,7 +4692,7 @@
4692
4692
  },
4693
4693
  {
4694
4694
  "kind": "Content",
4695
- "text": "<import(\"@alloy-js/core/jsx-runtime\")."
4695
+ "text": "<import(\"@alloy-js/core\")."
4696
4696
  },
4697
4697
  {
4698
4698
  "kind": "Reference",
@@ -4896,7 +4896,7 @@
4896
4896
  },
4897
4897
  {
4898
4898
  "kind": "Content",
4899
- "text": "import(\"@alloy-js/core/jsx-runtime\")."
4899
+ "text": "import(\"@alloy-js/core\")."
4900
4900
  },
4901
4901
  {
4902
4902
  "kind": "Reference",
@@ -4932,7 +4932,7 @@
4932
4932
  },
4933
4933
  {
4934
4934
  "kind": "Content",
4935
- "text": "<import(\"@alloy-js/core/jsx-runtime\")."
4935
+ "text": "<import(\"@alloy-js/core\")."
4936
4936
  },
4937
4937
  {
4938
4938
  "kind": "Reference",
@@ -4972,7 +4972,7 @@
4972
4972
  },
4973
4973
  {
4974
4974
  "kind": "Content",
4975
- "text": "import(\"@alloy-js/core/jsx-runtime\")."
4975
+ "text": "import(\"@alloy-js/core\")."
4976
4976
  },
4977
4977
  {
4978
4978
  "kind": "Reference",
@@ -5008,7 +5008,7 @@
5008
5008
  },
5009
5009
  {
5010
5010
  "kind": "Content",
5011
- "text": "<import(\"@alloy-js/core/jsx-runtime\")."
5011
+ "text": "<import(\"@alloy-js/core\")."
5012
5012
  },
5013
5013
  {
5014
5014
  "kind": "Reference",
@@ -5048,7 +5048,7 @@
5048
5048
  },
5049
5049
  {
5050
5050
  "kind": "Content",
5051
- "text": "import(\"@alloy-js/core/jsx-runtime\")."
5051
+ "text": "import(\"@alloy-js/core\")."
5052
5052
  },
5053
5053
  {
5054
5054
  "kind": "Reference",
@@ -5084,7 +5084,7 @@
5084
5084
  },
5085
5085
  {
5086
5086
  "kind": "Content",
5087
- "text": "<import(\"@alloy-js/core/jsx-runtime\")."
5087
+ "text": "<import(\"@alloy-js/core\")."
5088
5088
  },
5089
5089
  {
5090
5090
  "kind": "Reference",
@@ -5309,7 +5309,7 @@
5309
5309
  },
5310
5310
  {
5311
5311
  "kind": "Content",
5312
- "text": ") & {\n TypeParameters: import(\"@alloy-js/core/jsx-runtime\")."
5312
+ "text": ") & {\n TypeParameters: import(\"@alloy-js/core\")."
5313
5313
  },
5314
5314
  {
5315
5315
  "kind": "Reference",
@@ -5345,7 +5345,7 @@
5345
5345
  },
5346
5346
  {
5347
5347
  "kind": "Content",
5348
- "text": "<import(\"@alloy-js/core/jsx-runtime\")."
5348
+ "text": "<import(\"@alloy-js/core\")."
5349
5349
  },
5350
5350
  {
5351
5351
  "kind": "Reference",
@@ -5363,7 +5363,7 @@
5363
5363
  },
5364
5364
  {
5365
5365
  "kind": "Content",
5366
- "text": ">, \"tag\">>;\n Parameters: import(\"@alloy-js/core/jsx-runtime\")."
5366
+ "text": ">, \"tag\">>;\n Parameters: import(\"@alloy-js/core\")."
5367
5367
  },
5368
5368
  {
5369
5369
  "kind": "Reference",
@@ -5399,7 +5399,7 @@
5399
5399
  },
5400
5400
  {
5401
5401
  "kind": "Content",
5402
- "text": "<import(\"@alloy-js/core/jsx-runtime\")."
5402
+ "text": "<import(\"@alloy-js/core\")."
5403
5403
  },
5404
5404
  {
5405
5405
  "kind": "Reference",
@@ -5653,6 +5653,53 @@
5653
5653
  }
5654
5654
  ]
5655
5655
  },
5656
+ {
5657
+ "kind": "Function",
5658
+ "canonicalReference": "@alloy-js/typescript!getSourceDirectoryData:function(1)",
5659
+ "docComment": "",
5660
+ "excerptTokens": [
5661
+ {
5662
+ "kind": "Content",
5663
+ "text": "export declare function getSourceDirectoryData(sdContext: "
5664
+ },
5665
+ {
5666
+ "kind": "Reference",
5667
+ "text": "SourceDirectoryContext",
5668
+ "canonicalReference": "@alloy-js/core!SourceDirectoryContext:interface"
5669
+ },
5670
+ {
5671
+ "kind": "Content",
5672
+ "text": "): "
5673
+ },
5674
+ {
5675
+ "kind": "Reference",
5676
+ "text": "SourceDirectoryData",
5677
+ "canonicalReference": "@alloy-js/typescript!SourceDirectoryData:interface"
5678
+ },
5679
+ {
5680
+ "kind": "Content",
5681
+ "text": ";"
5682
+ }
5683
+ ],
5684
+ "fileUrlPath": "src/source-directory-data.ts",
5685
+ "returnTypeTokenRange": {
5686
+ "startIndex": 3,
5687
+ "endIndex": 4
5688
+ },
5689
+ "releaseTag": "Public",
5690
+ "overloadIndex": 1,
5691
+ "parameters": [
5692
+ {
5693
+ "parameterName": "sdContext",
5694
+ "parameterTypeTokenRange": {
5695
+ "startIndex": 1,
5696
+ "endIndex": 2
5697
+ },
5698
+ "isOptional": false
5699
+ }
5700
+ ],
5701
+ "name": "getSourceDirectoryData"
5702
+ },
5656
5703
  {
5657
5704
  "kind": "Function",
5658
5705
  "canonicalReference": "@alloy-js/typescript!IfStatement:function(1)",
@@ -6058,7 +6105,7 @@
6058
6105
  },
6059
6106
  {
6060
6107
  "kind": "Content",
6061
- "text": "() => import(\"@alloy-js/core/jsx-runtime\")."
6108
+ "text": "() => import(\"@alloy-js/core\")."
6062
6109
  },
6063
6110
  {
6064
6111
  "kind": "Reference",
@@ -6730,7 +6777,7 @@
6730
6777
  },
6731
6778
  {
6732
6779
  "kind": "Content",
6733
- "text": "import(\"@alloy-js/core/jsx-runtime\")."
6780
+ "text": "import(\"@alloy-js/core\")."
6734
6781
  },
6735
6782
  {
6736
6783
  "kind": "Reference",
@@ -6766,7 +6813,7 @@
6766
6813
  },
6767
6814
  {
6768
6815
  "kind": "Content",
6769
- "text": "<import(\"@alloy-js/core/jsx-runtime\")."
6816
+ "text": "<import(\"@alloy-js/core\")."
6770
6817
  },
6771
6818
  {
6772
6819
  "kind": "Reference",
@@ -6806,7 +6853,7 @@
6806
6853
  },
6807
6854
  {
6808
6855
  "kind": "Content",
6809
- "text": "import(\"@alloy-js/core/jsx-runtime\")."
6856
+ "text": "import(\"@alloy-js/core\")."
6810
6857
  },
6811
6858
  {
6812
6859
  "kind": "Reference",
@@ -6842,7 +6889,7 @@
6842
6889
  },
6843
6890
  {
6844
6891
  "kind": "Content",
6845
- "text": "<import(\"@alloy-js/core/jsx-runtime\")."
6892
+ "text": "<import(\"@alloy-js/core\")."
6846
6893
  },
6847
6894
  {
6848
6895
  "kind": "Reference",
@@ -8152,7 +8199,7 @@
8152
8199
  },
8153
8200
  {
8154
8201
  "kind": "Content",
8155
- "text": "import(\"@alloy-js/core/jsx-runtime\")."
8202
+ "text": "import(\"@alloy-js/core\")."
8156
8203
  },
8157
8204
  {
8158
8205
  "kind": "Reference",
@@ -9081,7 +9128,7 @@
9081
9128
  },
9082
9129
  {
9083
9130
  "kind": "Content",
9084
- "text": "<{\n readonly default: \"fs\";\n readonly named: [\"access\", \"appendFile\", \"chmod\", \"chown\", \"copyFile\", \"cp\", \"glob\", \"lchmod\", \"lchown\", \"lutimes\", \"link\", \"lstat\", \"mkdir\", \"mkdtemp\", \"open\", \"opendir\", \"readdir\", \"readFile\", \"readLink\", \"realpath\", \"rename\", \"rmdir\", \"rm\", \"stat\", \"statfs\", \"symlink\", \"truncate\", \"unlink\", \"utimes\", \"watch\", \"writeFile\", \"constants\"];\n }>;\n} & import(\"@alloy-js/core\")."
9131
+ "text": "<{\n readonly default: \"fs\";\n readonly named: [\"access\", \"appendFile\", \"chmod\", \"chown\", \"copyFile\", \"cp\", \"glob\", \"lchmod\", \"lchown\", \"lutimes\", \"link\", \"lstat\", \"mkdir\", \"mkdtemp\", \"open\", \"opendir\", \"readdir\", \"readFile\", \"readLink\", \"realpath\", \"rename\", \"rmdir\", \"rm\", \"stat\", \"statfs\", \"symlink\", \"truncate\", \"unlink\", \"utimes\", \"watch\", \"writeFile\", \"constants\"];\n }>;\n} & "
9085
9132
  },
9086
9133
  {
9087
9134
  "kind": "Reference",
@@ -9262,7 +9309,7 @@
9262
9309
  },
9263
9310
  {
9264
9311
  "kind": "Content",
9265
- "text": ";\n} & {} & {} & import(\"@alloy-js/core\")."
9312
+ "text": ";\n} & {} & {} & "
9266
9313
  },
9267
9314
  {
9268
9315
  "kind": "Reference",
@@ -9524,7 +9571,7 @@
9524
9571
  },
9525
9572
  {
9526
9573
  "kind": "Content",
9527
- "text": ";\n} & {} & {} & import(\"@alloy-js/core\")."
9574
+ "text": ";\n} & {} & {} & "
9528
9575
  },
9529
9576
  {
9530
9577
  "kind": "Reference",
@@ -10495,7 +10542,7 @@
10495
10542
  },
10496
10543
  {
10497
10544
  "kind": "Content",
10498
- "text": "import(\"@alloy-js/core/jsx-runtime\")."
10545
+ "text": "import(\"@alloy-js/core\")."
10499
10546
  },
10500
10547
  {
10501
10548
  "kind": "Reference",
@@ -11513,7 +11560,7 @@
11513
11560
  },
11514
11561
  {
11515
11562
  "kind": "Content",
11516
- "text": "import(\"@alloy-js/core/jsx-runtime\")."
11563
+ "text": "import(\"@alloy-js/core\")."
11517
11564
  },
11518
11565
  {
11519
11566
  "kind": "Reference",
@@ -11662,6 +11709,65 @@
11662
11709
  ],
11663
11710
  "extendsTokenRanges": []
11664
11711
  },
11712
+ {
11713
+ "kind": "Interface",
11714
+ "canonicalReference": "@alloy-js/typescript!SourceDirectoryData:interface",
11715
+ "docComment": "",
11716
+ "excerptTokens": [
11717
+ {
11718
+ "kind": "Content",
11719
+ "text": "export interface SourceDirectoryData "
11720
+ }
11721
+ ],
11722
+ "fileUrlPath": "src/source-directory-data.ts",
11723
+ "releaseTag": "Public",
11724
+ "name": "SourceDirectoryData",
11725
+ "preserveMemberOrder": false,
11726
+ "members": [
11727
+ {
11728
+ "kind": "PropertySignature",
11729
+ "canonicalReference": "@alloy-js/typescript!SourceDirectoryData#modules:member",
11730
+ "docComment": "",
11731
+ "excerptTokens": [
11732
+ {
11733
+ "kind": "Content",
11734
+ "text": "modules: "
11735
+ },
11736
+ {
11737
+ "kind": "Reference",
11738
+ "text": "Set",
11739
+ "canonicalReference": "!Set:interface"
11740
+ },
11741
+ {
11742
+ "kind": "Content",
11743
+ "text": "<"
11744
+ },
11745
+ {
11746
+ "kind": "Reference",
11747
+ "text": "TSModuleScope",
11748
+ "canonicalReference": "@alloy-js/typescript!TSModuleScope:class"
11749
+ },
11750
+ {
11751
+ "kind": "Content",
11752
+ "text": ">"
11753
+ },
11754
+ {
11755
+ "kind": "Content",
11756
+ "text": ";"
11757
+ }
11758
+ ],
11759
+ "isReadonly": false,
11760
+ "isOptional": false,
11761
+ "releaseTag": "Public",
11762
+ "name": "modules",
11763
+ "propertyTypeTokenRange": {
11764
+ "startIndex": 1,
11765
+ "endIndex": 5
11766
+ }
11767
+ }
11768
+ ],
11769
+ "extendsTokenRanges": []
11770
+ },
11665
11771
  {
11666
11772
  "kind": "Function",
11667
11773
  "canonicalReference": "@alloy-js/typescript!SourceFile:function(1)",
@@ -12161,7 +12267,7 @@
12161
12267
  },
12162
12268
  {
12163
12269
  "kind": "Content",
12164
- "text": "import(\"@alloy-js/core/jsx-runtime\")."
12270
+ "text": "import(\"@alloy-js/core\")."
12165
12271
  },
12166
12272
  {
12167
12273
  "kind": "Reference",
@@ -14133,7 +14239,7 @@
14133
14239
  },
14134
14240
  {
14135
14241
  "kind": "Content",
14136
- "text": "import(\"@alloy-js/core/jsx-runtime\")."
14242
+ "text": "import(\"@alloy-js/core\")."
14137
14243
  },
14138
14244
  {
14139
14245
  "kind": "Reference",
@@ -1,4 +1,5 @@
1
1
  import {
2
+ List,
2
3
  mapJoin,
3
4
  Output,
4
5
  printTree,
@@ -284,4 +285,36 @@ describe("symbols", () => {
284
285
  `,
285
286
  });
286
287
  });
288
+
289
+ it("uses name policy", () => {
290
+ const key1 = refkey();
291
+ const res = render(
292
+ <Output namePolicy={ts.createTSNamePolicy()}>
293
+ <ts.SourceFile path="test.ts">
294
+ <ts.VarDeclaration const name="dispatcher">
295
+ <ts.ObjectExpression>
296
+ <List comma enderPunctuation>
297
+ <ts.ObjectProperty
298
+ name={"foo_bar"}
299
+ value={"null"}
300
+ refkey={key1}
301
+ />
302
+ </List>
303
+ </ts.ObjectExpression>
304
+ </ts.VarDeclaration>
305
+ <line />
306
+ <ts.FunctionCallExpression target={key1} args={["data"]} />
307
+ </ts.SourceFile>
308
+ </Output>,
309
+ );
310
+
311
+ assertFileContents(res, {
312
+ "test.ts": `
313
+ const dispatcher = {
314
+ fooBar: null,
315
+ }
316
+ dispatcher.fooBar(data)
317
+ `,
318
+ });
319
+ });
287
320
  });
package/tsconfig.json CHANGED
@@ -3,7 +3,8 @@
3
3
  "compilerOptions": {
4
4
  "emitDeclarationOnly": true,
5
5
  "declaration": true,
6
- "outDir": "dist"
6
+ "outDir": "dist",
7
+ "types": ["@alloy-js/core/testing/matchers"]
7
8
  },
8
9
  "references": [{ "path": "../core" }],
9
10
  "include": ["src/**/*.ts", "src/**/*.tsx", "test/**/*.ts", "test/**/*.tsx"],
@@ -1 +0,0 @@
1
- import "vitest";
package/test/vitest.d.ts DELETED
@@ -1,15 +0,0 @@
1
- import "vitest";
2
-
3
- interface ToRenderToRenderOptions {
4
- printWidth?: number;
5
- tabWidth?: number;
6
- useTabs?: boolean;
7
- }
8
- interface CustomMatchers<R = unknown> {
9
- toRenderTo: (str: string, options?: ToRenderToRenderOptions) => R;
10
- }
11
-
12
- declare module "vitest" {
13
- interface Assertion<T = any> extends CustomMatchers<T> {}
14
- interface AsymmetricMatchersContaining extends CustomMatchers {}
15
- }