@alloy-js/csharp 0.16.0 → 0.18.0-dev.10

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 (130) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/src/components/ClassDeclaration.d.ts +57 -0
  3. package/dist/src/components/ClassDeclaration.d.ts.map +1 -0
  4. package/dist/src/components/{Class.js → ClassDeclaration.js} +58 -69
  5. package/dist/src/components/ClassMethod.d.ts +25 -0
  6. package/dist/src/components/ClassMethod.d.ts.map +1 -0
  7. package/dist/src/components/ClassMethod.js +60 -0
  8. package/dist/src/components/Declaration.d.ts.map +1 -1
  9. package/dist/src/components/Declaration.js +4 -2
  10. package/dist/src/components/EnumDeclaration.d.ts +34 -0
  11. package/dist/src/components/EnumDeclaration.d.ts.map +1 -0
  12. package/dist/src/components/{Enum.js → EnumDeclaration.js} +36 -14
  13. package/dist/src/components/Namespace.d.ts.map +1 -1
  14. package/dist/src/components/Namespace.js +2 -2
  15. package/dist/src/components/Parameters.d.ts.map +1 -1
  16. package/dist/src/components/Parameters.js +3 -3
  17. package/dist/src/components/doc/comment.d.ts +70 -0
  18. package/dist/src/components/doc/comment.d.ts.map +1 -0
  19. package/dist/src/components/doc/comment.js +88 -0
  20. package/dist/src/components/doc/comment.test.d.ts +2 -0
  21. package/dist/src/components/doc/comment.test.d.ts.map +1 -0
  22. package/dist/src/components/doc/comment.test.js +348 -0
  23. package/dist/src/components/doc/from-markdown.d.ts +6 -0
  24. package/dist/src/components/doc/from-markdown.d.ts.map +1 -0
  25. package/dist/src/components/doc/from-markdown.js +58 -0
  26. package/dist/src/components/doc/from-markdown.test.d.ts +2 -0
  27. package/dist/src/components/doc/from-markdown.test.d.ts.map +1 -0
  28. package/dist/src/components/doc/from-markdown.test.js +83 -0
  29. package/dist/src/components/index.d.ts +7 -2
  30. package/dist/src/components/index.d.ts.map +1 -1
  31. package/dist/src/components/index.js +7 -2
  32. package/dist/src/components/interface/declaration.d.ts +34 -0
  33. package/dist/src/components/interface/declaration.d.ts.map +1 -0
  34. package/dist/src/components/interface/declaration.js +90 -0
  35. package/dist/src/components/interface/declaration.test.d.ts +2 -0
  36. package/dist/src/components/interface/declaration.test.d.ts.map +1 -0
  37. package/dist/src/components/interface/declaration.test.js +69 -0
  38. package/dist/src/components/interface/method.d.ts +18 -0
  39. package/dist/src/components/interface/method.d.ts.map +1 -0
  40. package/dist/src/components/interface/method.js +59 -0
  41. package/dist/src/components/interface/method.test.d.ts +2 -0
  42. package/dist/src/components/interface/method.test.d.ts.map +1 -0
  43. package/dist/src/components/interface/method.test.js +131 -0
  44. package/dist/src/components/interface/property.d.ts +21 -0
  45. package/dist/src/components/interface/property.d.ts.map +1 -0
  46. package/dist/src/components/interface/property.js +59 -0
  47. package/dist/src/components/interface/property.test.d.ts +2 -0
  48. package/dist/src/components/interface/property.test.d.ts.map +1 -0
  49. package/dist/src/components/interface/property.test.js +165 -0
  50. package/dist/src/components/stc/index.d.ts +2 -2
  51. package/dist/src/components/stc/index.d.ts.map +1 -1
  52. package/dist/src/components/stc/index.js +2 -2
  53. package/dist/src/modifiers.d.ts +13 -4
  54. package/dist/src/modifiers.d.ts.map +1 -1
  55. package/dist/src/modifiers.js +13 -27
  56. package/dist/src/name-policy.d.ts +1 -1
  57. package/dist/src/name-policy.d.ts.map +1 -1
  58. package/dist/src/name-policy.js +1 -0
  59. package/dist/src/symbols/csharp-output-symbol.d.ts +4 -4
  60. package/dist/src/symbols/csharp-output-symbol.d.ts.map +1 -1
  61. package/dist/src/symbols/csharp-output-symbol.js +13 -13
  62. package/dist/src/symbols/scopes.d.ts +6 -8
  63. package/dist/src/symbols/scopes.d.ts.map +1 -1
  64. package/dist/src/symbols/scopes.js +14 -19
  65. package/dist/test/class-declaration.test.d.ts +2 -0
  66. package/dist/test/class-declaration.test.d.ts.map +1 -0
  67. package/dist/test/{class.test.js → class-declaration.test.js} +123 -73
  68. package/dist/test/class-method.test.d.ts +2 -0
  69. package/dist/test/class-method.test.d.ts.map +1 -0
  70. package/dist/test/class-method.test.js +161 -0
  71. package/dist/test/enum.test.js +12 -12
  72. package/dist/test/namespace.test.js +8 -8
  73. package/dist/test/project-directory.test.d.ts +2 -0
  74. package/dist/test/project-directory.test.d.ts.map +1 -0
  75. package/dist/test/{projectdirectory.test.js → project-directory.test.js} +8 -8
  76. package/dist/test/sourcefile.test.js +4 -4
  77. package/dist/test/using.test.js +9 -9
  78. package/dist/test/utils.d.ts +3 -0
  79. package/dist/test/utils.d.ts.map +1 -1
  80. package/dist/test/utils.js +15 -0
  81. package/dist/test/vitest.setup.d.ts +2 -0
  82. package/dist/test/vitest.setup.d.ts.map +1 -0
  83. package/dist/test/vitest.setup.js +1 -0
  84. package/dist/tsconfig.tsbuildinfo +1 -1
  85. package/package.json +8 -7
  86. package/src/components/{Class.tsx → ClassDeclaration.tsx} +84 -98
  87. package/src/components/ClassMethod.tsx +94 -0
  88. package/src/components/Declaration.tsx +5 -2
  89. package/src/components/EnumDeclaration.tsx +99 -0
  90. package/src/components/Namespace.tsx +2 -6
  91. package/src/components/Parameters.tsx +2 -3
  92. package/src/components/doc/comment.test.tsx +337 -0
  93. package/src/components/doc/comment.tsx +152 -0
  94. package/src/components/doc/from-markdown.test.tsx +103 -0
  95. package/src/components/doc/from-markdown.tsx +58 -0
  96. package/src/components/index.ts +7 -2
  97. package/src/components/interface/declaration.test.tsx +56 -0
  98. package/src/components/interface/declaration.tsx +109 -0
  99. package/src/components/interface/method.test.tsx +120 -0
  100. package/src/components/interface/method.tsx +82 -0
  101. package/src/components/interface/property.test.tsx +144 -0
  102. package/src/components/interface/property.tsx +90 -0
  103. package/src/components/stc/index.ts +2 -2
  104. package/src/modifiers.ts +32 -37
  105. package/src/name-policy.ts +2 -0
  106. package/src/symbols/csharp-output-symbol.ts +13 -18
  107. package/src/symbols/reference.ts +1 -1
  108. package/src/symbols/scopes.ts +15 -34
  109. package/temp/api.json +3470 -649
  110. package/test/{class.test.tsx → class-declaration.test.tsx} +103 -99
  111. package/test/class-method.test.tsx +147 -0
  112. package/test/enum.test.tsx +11 -11
  113. package/test/namespace.test.tsx +4 -4
  114. package/test/{projectdirectory.test.tsx → project-directory.test.tsx} +4 -4
  115. package/test/sourcefile.test.tsx +2 -2
  116. package/test/using.test.tsx +9 -9
  117. package/test/utils.tsx +9 -0
  118. package/test/vitest.setup.ts +1 -0
  119. package/tsconfig.json +2 -1
  120. package/tsdoc-metadata.json +1 -1
  121. package/vitest.config.ts +3 -0
  122. package/dist/src/components/Class.d.ts +0 -36
  123. package/dist/src/components/Class.d.ts.map +0 -1
  124. package/dist/src/components/Enum.d.ts +0 -15
  125. package/dist/src/components/Enum.d.ts.map +0 -1
  126. package/dist/test/class.test.d.ts +0 -2
  127. package/dist/test/class.test.d.ts.map +0 -1
  128. package/dist/test/projectdirectory.test.d.ts +0 -2
  129. package/dist/test/projectdirectory.test.d.ts.map +0 -1
  130. package/src/components/Enum.tsx +0 -78
@@ -0,0 +1,161 @@
1
+ import { memo as _$memo, createComponent as _$createComponent, mergeProps as _$mergeProps } from "@alloy-js/core/jsx-runtime";
2
+ import { describe, expect, it } from "vitest";
3
+ import { ClassDeclaration, ClassMethod } from "../src/index.js";
4
+ import { TestNamespace } from "./utils.js";
5
+ const Wrapper = props => _$createComponent(TestNamespace, {
6
+ get children() {
7
+ return _$createComponent(ClassDeclaration, {
8
+ "public": true,
9
+ name: "TestClass",
10
+ get children() {
11
+ return props.children;
12
+ }
13
+ });
14
+ }
15
+ });
16
+ describe("modifiers", () => {
17
+ describe("access modifiers", () => {
18
+ it.each(["public", "private", "protected", "internal"])("%s", accessModifier => {
19
+ expect(_$createComponent(Wrapper, {
20
+ get children() {
21
+ return _$createComponent(ClassMethod, _$mergeProps({
22
+ [accessModifier]: true
23
+ }, {
24
+ name: "MethodOne"
25
+ }));
26
+ }
27
+ })).toRenderTo(`
28
+ public class TestClass
29
+ {
30
+ ${accessModifier} void MethodOne() {}
31
+ }
32
+ `);
33
+ });
34
+ });
35
+ describe("method modifiers", () => {
36
+ it.each(["static", "virtual", "sealed"])("%s", methodModifier => {
37
+ expect(_$createComponent(Wrapper, {
38
+ get children() {
39
+ return _$createComponent(ClassMethod, _$mergeProps({
40
+ [methodModifier]: true
41
+ }, {
42
+ name: "MethodOne"
43
+ }));
44
+ }
45
+ })).toRenderTo(`
46
+ public class TestClass
47
+ {
48
+ ${methodModifier} void MethodOne() {}
49
+ }
50
+ `);
51
+ });
52
+ it("abstract exclude body", () => {
53
+ expect(_$createComponent(Wrapper, {
54
+ get children() {
55
+ return _$createComponent(ClassMethod, {
56
+ abstract: true,
57
+ name: "MethodOne"
58
+ });
59
+ }
60
+ })).toRenderTo(`
61
+ public class TestClass
62
+ {
63
+ abstract void MethodOne();
64
+ }
65
+ `);
66
+ });
67
+ });
68
+ it("mark method async", () => {
69
+ expect(_$createComponent(Wrapper, {
70
+ get children() {
71
+ return _$createComponent(ClassMethod, {
72
+ async: true,
73
+ name: "MethodOne"
74
+ });
75
+ }
76
+ })).toRenderTo(`
77
+ public class TestClass
78
+ {
79
+ async Task MethodOne() {}
80
+ }
81
+ `);
82
+ });
83
+ it("combine modifiers", () => {
84
+ expect(_$createComponent(Wrapper, {
85
+ get children() {
86
+ return _$createComponent(ClassMethod, {
87
+ async: true,
88
+ returns: "Task",
89
+ "public": true,
90
+ abstract: true,
91
+ name: "MethodOne"
92
+ });
93
+ }
94
+ })).toRenderTo(`
95
+ public class TestClass
96
+ {
97
+ public abstract async Task MethodOne();
98
+ }
99
+ `);
100
+ });
101
+ });
102
+ it("applies PascalCase naming policy", () => {
103
+ expect(_$createComponent(Wrapper, {
104
+ get children() {
105
+ return _$createComponent(ClassMethod, {
106
+ name: "method_one"
107
+ });
108
+ }
109
+ })).toRenderTo(`
110
+ public class TestClass
111
+ {
112
+ void MethodOne() {}
113
+ }
114
+ `);
115
+ });
116
+ it("defines params and return type", () => {
117
+ const params = [{
118
+ name: "intParam",
119
+ type: "int"
120
+ }, {
121
+ name: "stringParam",
122
+ type: "string"
123
+ }];
124
+ const res = _$createComponent(Wrapper, {
125
+ get children() {
126
+ return _$createComponent(ClassMethod, {
127
+ "public": true,
128
+ name: "MethodOne",
129
+ parameters: params,
130
+ returns: "string"
131
+ });
132
+ }
133
+ });
134
+ expect(res).toRenderTo(`
135
+ public class TestClass
136
+ {
137
+ public string MethodOne(int intParam, string stringParam) {}
138
+ }
139
+ `);
140
+ });
141
+ it("specify doc comment", () => {
142
+ expect(_$createComponent(TestNamespace, {
143
+ get children() {
144
+ return _$createComponent(ClassDeclaration, {
145
+ name: "Test",
146
+ get children() {
147
+ return _$createComponent(ClassMethod, {
148
+ name: "Method",
149
+ doc: "This is a test"
150
+ });
151
+ }
152
+ });
153
+ }
154
+ })).toRenderTo(`
155
+ class Test
156
+ {
157
+ /// This is a test
158
+ void Method() {}
159
+ }
160
+ `);
161
+ });
@@ -5,8 +5,8 @@ import { expect, it } from "vitest";
5
5
  import * as csharp from "../src/index.js";
6
6
  import * as utils from "./utils.js";
7
7
  it("declares enum with no members", () => {
8
- const res = utils.toSourceText(_$createComponent(csharp.Enum, {
9
- accessModifier: "public",
8
+ const res = utils.toSourceText(_$createComponent(csharp.EnumDeclaration, {
9
+ "public": true,
10
10
  name: "TestEnum"
11
11
  }));
12
12
  expect(res).toBe(coretest.d`
@@ -17,8 +17,8 @@ it("declares enum with no members", () => {
17
17
  `);
18
18
  });
19
19
  it("declares enum with members", () => {
20
- const res = utils.toSourceText(_$createComponent(csharp.Enum, {
21
- accessModifier: "public",
20
+ const res = utils.toSourceText(_$createComponent(csharp.EnumDeclaration, {
21
+ "public": true,
22
22
  name: "TestEnum",
23
23
  get children() {
24
24
  return [_$createComponent(csharp.EnumMember, {
@@ -40,8 +40,8 @@ it("declares enum with members", () => {
40
40
  `);
41
41
  });
42
42
  it("applies naming policy to enum and members", () => {
43
- const res = utils.toSourceText(_$createComponent(csharp.Enum, {
44
- accessModifier: "public",
43
+ const res = utils.toSourceText(_$createComponent(csharp.EnumDeclaration, {
44
+ "public": true,
45
45
  name: "testEnum",
46
46
  get children() {
47
47
  return [_$createComponent(csharp.EnumMember, {
@@ -73,8 +73,8 @@ it("can reference things by refkey", () => {
73
73
  return _$createComponent(csharp.SourceFile, {
74
74
  path: "Test.cs",
75
75
  get children() {
76
- return [_$createComponent(csharp.Enum, {
77
- accessModifier: "public",
76
+ return [_$createComponent(csharp.EnumDeclaration, {
77
+ "public": true,
78
78
  name: "TestEnum",
79
79
  refkey: enumRK,
80
80
  get children() {
@@ -116,8 +116,8 @@ it("can reference things by refkey across files", () => {
116
116
  return [_$createComponent(csharp.SourceFile, {
117
117
  path: "Test.cs",
118
118
  get children() {
119
- return [_$createComponent(csharp.Enum, {
120
- accessModifier: "public",
119
+ return [_$createComponent(csharp.EnumDeclaration, {
120
+ "public": true,
121
121
  name: "TestEnum",
122
122
  get children() {
123
123
  return [_$createComponent(csharp.EnumMember, {
@@ -131,8 +131,8 @@ it("can reference things by refkey across files", () => {
131
131
  }), _$createComponent(csharp.SourceFile, {
132
132
  path: "Other.cs",
133
133
  get children() {
134
- return [_$createComponent(csharp.Enum, {
135
- accessModifier: "public",
134
+ return [_$createComponent(csharp.EnumDeclaration, {
135
+ "public": true,
136
136
  name: "OtherEnum",
137
137
  refkey: enumRK,
138
138
  get children() {
@@ -12,16 +12,16 @@ it("defines multiple namespaces and source files with unique content", () => {
12
12
  return [_$createComponent(csharp.SourceFile, {
13
13
  path: "Model1.cs",
14
14
  get children() {
15
- return _$createComponent(csharp.Class, {
16
- accessModifier: "public",
15
+ return _$createComponent(csharp.ClassDeclaration, {
16
+ "public": true,
17
17
  name: "Model1"
18
18
  });
19
19
  }
20
20
  }), _$createComponent(csharp.SourceFile, {
21
21
  path: "Model2.cs",
22
22
  get children() {
23
- return _$createComponent(csharp.Class, {
24
- accessModifier: "public",
23
+ return _$createComponent(csharp.ClassDeclaration, {
24
+ "public": true,
25
25
  name: "Model2"
26
26
  });
27
27
  }
@@ -33,16 +33,16 @@ it("defines multiple namespaces and source files with unique content", () => {
33
33
  return [_$createComponent(csharp.SourceFile, {
34
34
  path: "Model3.cs",
35
35
  get children() {
36
- return _$createComponent(csharp.Class, {
37
- accessModifier: "public",
36
+ return _$createComponent(csharp.ClassDeclaration, {
37
+ "public": true,
38
38
  name: "Model3"
39
39
  });
40
40
  }
41
41
  }), _$createComponent(csharp.SourceFile, {
42
42
  path: "Model4.cs",
43
43
  get children() {
44
- return _$createComponent(csharp.Class, {
45
- accessModifier: "public",
44
+ return _$createComponent(csharp.ClassDeclaration, {
45
+ "public": true,
46
46
  name: "Model4"
47
47
  });
48
48
  }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=project-directory.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-directory.test.d.ts","sourceRoot":"","sources":["../../test/project-directory.test.tsx"],"names":[],"mappings":""}
@@ -18,16 +18,16 @@ it("defines a project directory file with multiple source files", () => {
18
18
  return [_$createComponent(csharp.SourceFile, {
19
19
  path: "Test1.cs",
20
20
  get children() {
21
- return _$createComponent(csharp.Class, {
22
- accessModifier: "public",
21
+ return _$createComponent(csharp.ClassDeclaration, {
22
+ "public": true,
23
23
  name: "TestClass1"
24
24
  });
25
25
  }
26
26
  }), _$createComponent(csharp.SourceFile, {
27
27
  path: "Test2.cs",
28
28
  get children() {
29
- return _$createComponent(csharp.Class, {
30
- accessModifier: "public",
29
+ return _$createComponent(csharp.ClassDeclaration, {
30
+ "public": true,
31
31
  name: "TestClass2"
32
32
  });
33
33
  }
@@ -82,16 +82,16 @@ it("defines a project directory file with multiple source files and a custom TFM
82
82
  return [_$createComponent(csharp.SourceFile, {
83
83
  path: "Test1.cs",
84
84
  get children() {
85
- return _$createComponent(csharp.Class, {
86
- accessModifier: "public",
85
+ return _$createComponent(csharp.ClassDeclaration, {
86
+ "public": true,
87
87
  name: "TestClass1"
88
88
  });
89
89
  }
90
90
  }), _$createComponent(csharp.SourceFile, {
91
91
  path: "Test2.cs",
92
92
  get children() {
93
- return _$createComponent(csharp.Class, {
94
- accessModifier: "public",
93
+ return _$createComponent(csharp.ClassDeclaration, {
94
+ "public": true,
95
95
  name: "TestClass2"
96
96
  });
97
97
  }
@@ -12,16 +12,16 @@ it("defines multiple source files with unique content", () => {
12
12
  return [_$createComponent(csharp.SourceFile, {
13
13
  path: "Test1.cs",
14
14
  get children() {
15
- return _$createComponent(csharp.Class, {
16
- accessModifier: "public",
15
+ return _$createComponent(csharp.ClassDeclaration, {
16
+ "public": true,
17
17
  name: "TestClass1"
18
18
  });
19
19
  }
20
20
  }), _$createComponent(csharp.SourceFile, {
21
21
  path: "Test2.cs",
22
22
  get children() {
23
- return _$createComponent(csharp.Class, {
24
- accessModifier: "public",
23
+ return _$createComponent(csharp.ClassDeclaration, {
24
+ "public": true,
25
25
  name: "TestClass2"
26
26
  });
27
27
  }
@@ -63,16 +63,16 @@ it("adds using statement across namespaces", () => {
63
63
  return _$createComponent(csharp.SourceFile, {
64
64
  path: "Models.cs",
65
65
  get children() {
66
- return [_$createComponent(csharp.Class, {
67
- accessModifier: "public",
66
+ return [_$createComponent(csharp.ClassDeclaration, {
67
+ "public": true,
68
68
  name: "Input",
69
69
  refkey: inputTypeRefkey
70
- }), _$createIntrinsic("hbr", {}), _$createComponent(csharp.Class, {
71
- accessModifier: "public",
70
+ }), _$createIntrinsic("hbr", {}), _$createComponent(csharp.ClassDeclaration, {
71
+ "public": true,
72
72
  name: "Output",
73
73
  refkey: outputTypeRefkey
74
- }), _$createIntrinsic("hbr", {}), _$createComponent(csharp.Enum, {
75
- accessModifier: "public",
74
+ }), _$createIntrinsic("hbr", {}), _$createComponent(csharp.EnumDeclaration, {
75
+ "public": true,
76
76
  name: "TestEnum",
77
77
  get children() {
78
78
  return [_$createComponent(csharp.EnumMember, {
@@ -93,12 +93,12 @@ it("adds using statement across namespaces", () => {
93
93
  path: "Client.cs",
94
94
  using: ["System"],
95
95
  get children() {
96
- return [_$createComponent(csharp.Class, {
97
- accessModifier: "public",
96
+ return [_$createComponent(csharp.ClassDeclaration, {
97
+ "public": true,
98
98
  name: "Client",
99
99
  get children() {
100
100
  return _$createComponent(csharp.ClassMethod, {
101
- accessModifier: "public",
101
+ "public": true,
102
102
  name: "MethodOne",
103
103
  parameters: params,
104
104
  returns: outputTypeRefkey
@@ -1,4 +1,7 @@
1
1
  import * as core from "@alloy-js/core";
2
+ export declare function TestNamespace(props: {
3
+ children: core.Children;
4
+ }): core.Children;
2
5
  export declare function toSourceText(c: core.Children): string;
3
6
  export declare function testRender(c: core.Children): core.OutputDirectory;
4
7
  export declare function findFile(res: core.OutputDirectory, path: string): core.OutputFile;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../test/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AAKvC,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,GAAG,MAAM,CAWrD;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,eAAe,CAMjE;AAED,wBAAgB,QAAQ,CACtB,GAAG,EAAE,IAAI,CAAC,eAAe,EACzB,IAAI,EAAE,MAAM,GACX,IAAI,CAAC,UAAU,CA2BjB;AAED,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,IAAI,CAAC,eAAe,EACzB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACpC,IAAI,CAKN"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../test/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AAKvC,wBAAgB,aAAa,CAAC,KAAK,EAAE;IACnC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC;CACzB,GAAG,IAAI,CAAC,QAAQ,CAMhB;AACD,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,GAAG,MAAM,CAWrD;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,eAAe,CAMjE;AAED,wBAAgB,QAAQ,CACtB,GAAG,EAAE,IAAI,CAAC,eAAe,EACzB,IAAI,EAAE,MAAM,GACX,IAAI,CAAC,UAAU,CA2BjB;AAED,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,IAAI,CAAC,eAAe,EACzB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACpC,IAAI,CAKN"}
@@ -3,6 +3,21 @@ import * as core from "@alloy-js/core";
3
3
  import * as coretest from "@alloy-js/core/testing";
4
4
  import { expect } from "vitest";
5
5
  import * as csharp from "../src/index.js";
6
+ export function TestNamespace(props) {
7
+ return _$createComponent(core.Output, {
8
+ get namePolicy() {
9
+ return csharp.createCSharpNamePolicy();
10
+ },
11
+ get children() {
12
+ return _$createComponent(csharp.Namespace, {
13
+ name: "TestCode",
14
+ get children() {
15
+ return props.children;
16
+ }
17
+ });
18
+ }
19
+ });
20
+ }
6
21
  export function toSourceText(c) {
7
22
  const res = core.render(_$createComponent(core.Output, {
8
23
  get namePolicy() {
@@ -0,0 +1,2 @@
1
+ import "@alloy-js/core/testing";
2
+ //# sourceMappingURL=vitest.setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vitest.setup.d.ts","sourceRoot":"","sources":["../../test/vitest.setup.ts"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAC"}
@@ -0,0 +1 @@
1
+ import "@alloy-js/core/testing";