@alloy-js/csharp 0.19.0-dev.4 → 0.19.0-dev.7

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 (34) hide show
  1. package/dist/src/components/ClassDeclaration.d.ts +0 -8
  2. package/dist/src/components/ClassDeclaration.d.ts.map +1 -1
  3. package/dist/src/components/ClassDeclaration.js +1 -31
  4. package/dist/src/components/field/field.d.ts +19 -0
  5. package/dist/src/components/field/field.d.ts.map +1 -0
  6. package/dist/src/components/field/field.js +38 -0
  7. package/dist/src/components/field/field.test.d.ts +2 -0
  8. package/dist/src/components/field/field.test.d.ts.map +1 -0
  9. package/dist/src/components/field/field.test.js +143 -0
  10. package/dist/src/components/index.d.ts +1 -0
  11. package/dist/src/components/index.d.ts.map +1 -1
  12. package/dist/src/components/index.js +1 -0
  13. package/dist/src/components/stc/index.d.ts +1 -1
  14. package/dist/src/components/stc/index.d.ts.map +1 -1
  15. package/dist/src/components/stc/index.js +1 -1
  16. package/dist/src/components/struct/declaration.d.ts +2 -0
  17. package/dist/src/components/struct/declaration.d.ts.map +1 -1
  18. package/dist/src/components/struct/declaration.js +6 -2
  19. package/dist/src/components/struct/declaration.test.js +44 -0
  20. package/dist/src/name-policy.d.ts.map +1 -1
  21. package/dist/src/name-policy.js +2 -0
  22. package/dist/test/class-declaration.test.js +19 -18
  23. package/dist/tsconfig.tsbuildinfo +1 -1
  24. package/package.json +1 -1
  25. package/src/components/ClassDeclaration.tsx +2 -40
  26. package/src/components/field/field.test.tsx +122 -0
  27. package/src/components/field/field.tsx +70 -0
  28. package/src/components/index.ts +1 -0
  29. package/src/components/stc/index.ts +1 -1
  30. package/src/components/struct/declaration.test.tsx +30 -0
  31. package/src/components/struct/declaration.tsx +11 -0
  32. package/src/name-policy.ts +2 -0
  33. package/temp/api.json +361 -190
  34. package/test/class-declaration.test.tsx +19 -38
package/temp/api.json CHANGED
@@ -1078,196 +1078,6 @@
1078
1078
  }
1079
1079
  ]
1080
1080
  },
1081
- {
1082
- "kind": "Function",
1083
- "canonicalReference": "@alloy-js/csharp!ClassMember:function(1)",
1084
- "docComment": "",
1085
- "excerptTokens": [
1086
- {
1087
- "kind": "Content",
1088
- "text": "export declare function ClassMember(props: "
1089
- },
1090
- {
1091
- "kind": "Reference",
1092
- "text": "ClassMemberProps",
1093
- "canonicalReference": "@alloy-js/csharp!ClassMemberProps:interface"
1094
- },
1095
- {
1096
- "kind": "Content",
1097
- "text": "): "
1098
- },
1099
- {
1100
- "kind": "Reference",
1101
- "text": "core.Children",
1102
- "canonicalReference": "@alloy-js/core!Children:type"
1103
- },
1104
- {
1105
- "kind": "Content",
1106
- "text": ";"
1107
- }
1108
- ],
1109
- "fileUrlPath": "src/components/ClassDeclaration.tsx",
1110
- "returnTypeTokenRange": {
1111
- "startIndex": 3,
1112
- "endIndex": 4
1113
- },
1114
- "releaseTag": "Public",
1115
- "overloadIndex": 1,
1116
- "parameters": [
1117
- {
1118
- "parameterName": "props",
1119
- "parameterTypeTokenRange": {
1120
- "startIndex": 1,
1121
- "endIndex": 2
1122
- },
1123
- "isOptional": false
1124
- }
1125
- ],
1126
- "name": "ClassMember"
1127
- },
1128
- {
1129
- "kind": "Interface",
1130
- "canonicalReference": "@alloy-js/csharp!ClassMemberProps:interface",
1131
- "docComment": "",
1132
- "excerptTokens": [
1133
- {
1134
- "kind": "Content",
1135
- "text": "export interface ClassMemberProps extends "
1136
- },
1137
- {
1138
- "kind": "Reference",
1139
- "text": "AccessModifiers",
1140
- "canonicalReference": "@alloy-js/csharp!AccessModifiers:interface"
1141
- },
1142
- {
1143
- "kind": "Content",
1144
- "text": " "
1145
- }
1146
- ],
1147
- "fileUrlPath": "src/components/ClassDeclaration.tsx",
1148
- "releaseTag": "Public",
1149
- "name": "ClassMemberProps",
1150
- "preserveMemberOrder": false,
1151
- "members": [
1152
- {
1153
- "kind": "PropertySignature",
1154
- "canonicalReference": "@alloy-js/csharp!ClassMemberProps#doc:member",
1155
- "docComment": "/**\n * Doc comment\n */\n",
1156
- "excerptTokens": [
1157
- {
1158
- "kind": "Content",
1159
- "text": "doc?: "
1160
- },
1161
- {
1162
- "kind": "Reference",
1163
- "text": "core.Children",
1164
- "canonicalReference": "@alloy-js/core!Children:type"
1165
- },
1166
- {
1167
- "kind": "Content",
1168
- "text": ";"
1169
- }
1170
- ],
1171
- "isReadonly": false,
1172
- "isOptional": true,
1173
- "releaseTag": "Public",
1174
- "name": "doc",
1175
- "propertyTypeTokenRange": {
1176
- "startIndex": 1,
1177
- "endIndex": 2
1178
- }
1179
- },
1180
- {
1181
- "kind": "PropertySignature",
1182
- "canonicalReference": "@alloy-js/csharp!ClassMemberProps#name:member",
1183
- "docComment": "",
1184
- "excerptTokens": [
1185
- {
1186
- "kind": "Content",
1187
- "text": "name: "
1188
- },
1189
- {
1190
- "kind": "Content",
1191
- "text": "string"
1192
- },
1193
- {
1194
- "kind": "Content",
1195
- "text": ";"
1196
- }
1197
- ],
1198
- "isReadonly": false,
1199
- "isOptional": false,
1200
- "releaseTag": "Public",
1201
- "name": "name",
1202
- "propertyTypeTokenRange": {
1203
- "startIndex": 1,
1204
- "endIndex": 2
1205
- }
1206
- },
1207
- {
1208
- "kind": "PropertySignature",
1209
- "canonicalReference": "@alloy-js/csharp!ClassMemberProps#refkey:member",
1210
- "docComment": "",
1211
- "excerptTokens": [
1212
- {
1213
- "kind": "Content",
1214
- "text": "refkey?: "
1215
- },
1216
- {
1217
- "kind": "Reference",
1218
- "text": "core.Refkey",
1219
- "canonicalReference": "@alloy-js/core!Refkey:type"
1220
- },
1221
- {
1222
- "kind": "Content",
1223
- "text": ";"
1224
- }
1225
- ],
1226
- "isReadonly": false,
1227
- "isOptional": true,
1228
- "releaseTag": "Public",
1229
- "name": "refkey",
1230
- "propertyTypeTokenRange": {
1231
- "startIndex": 1,
1232
- "endIndex": 2
1233
- }
1234
- },
1235
- {
1236
- "kind": "PropertySignature",
1237
- "canonicalReference": "@alloy-js/csharp!ClassMemberProps#type:member",
1238
- "docComment": "",
1239
- "excerptTokens": [
1240
- {
1241
- "kind": "Content",
1242
- "text": "type: "
1243
- },
1244
- {
1245
- "kind": "Reference",
1246
- "text": "core.Children",
1247
- "canonicalReference": "@alloy-js/core!Children:type"
1248
- },
1249
- {
1250
- "kind": "Content",
1251
- "text": ";"
1252
- }
1253
- ],
1254
- "isReadonly": false,
1255
- "isOptional": false,
1256
- "releaseTag": "Public",
1257
- "name": "type",
1258
- "propertyTypeTokenRange": {
1259
- "startIndex": 1,
1260
- "endIndex": 2
1261
- }
1262
- }
1263
- ],
1264
- "extendsTokenRanges": [
1265
- {
1266
- "startIndex": 1,
1267
- "endIndex": 2
1268
- }
1269
- ]
1270
- },
1271
1081
  {
1272
1082
  "kind": "Interface",
1273
1083
  "canonicalReference": "@alloy-js/csharp!ClassModifiers:interface",
@@ -4239,6 +4049,335 @@
4239
4049
  ],
4240
4050
  "extendsTokenRanges": []
4241
4051
  },
4052
+ {
4053
+ "kind": "Function",
4054
+ "canonicalReference": "@alloy-js/csharp!Field:function(1)",
4055
+ "docComment": "/**\n * Render a c# field\n */\n",
4056
+ "excerptTokens": [
4057
+ {
4058
+ "kind": "Content",
4059
+ "text": "export declare function Field(props: "
4060
+ },
4061
+ {
4062
+ "kind": "Reference",
4063
+ "text": "FieldProps",
4064
+ "canonicalReference": "@alloy-js/csharp!FieldProps:interface"
4065
+ },
4066
+ {
4067
+ "kind": "Content",
4068
+ "text": "): "
4069
+ },
4070
+ {
4071
+ "kind": "Reference",
4072
+ "text": "Children",
4073
+ "canonicalReference": "@alloy-js/core!Children:type"
4074
+ },
4075
+ {
4076
+ "kind": "Content",
4077
+ "text": ";"
4078
+ }
4079
+ ],
4080
+ "fileUrlPath": "src/components/field/field.tsx",
4081
+ "returnTypeTokenRange": {
4082
+ "startIndex": 3,
4083
+ "endIndex": 4
4084
+ },
4085
+ "releaseTag": "Public",
4086
+ "overloadIndex": 1,
4087
+ "parameters": [
4088
+ {
4089
+ "parameterName": "props",
4090
+ "parameterTypeTokenRange": {
4091
+ "startIndex": 1,
4092
+ "endIndex": 2
4093
+ },
4094
+ "isOptional": false
4095
+ }
4096
+ ],
4097
+ "name": "Field"
4098
+ },
4099
+ {
4100
+ "kind": "Interface",
4101
+ "canonicalReference": "@alloy-js/csharp!FieldModifiers:interface",
4102
+ "docComment": "/**\n * Field modifiers.\n */\n",
4103
+ "excerptTokens": [
4104
+ {
4105
+ "kind": "Content",
4106
+ "text": "export interface FieldModifiers "
4107
+ }
4108
+ ],
4109
+ "fileUrlPath": "src/components/field/field.tsx",
4110
+ "releaseTag": "Public",
4111
+ "name": "FieldModifiers",
4112
+ "preserveMemberOrder": false,
4113
+ "members": [
4114
+ {
4115
+ "kind": "PropertySignature",
4116
+ "canonicalReference": "@alloy-js/csharp!FieldModifiers#new:member",
4117
+ "docComment": "",
4118
+ "excerptTokens": [
4119
+ {
4120
+ "kind": "Content",
4121
+ "text": "readonly new?: "
4122
+ },
4123
+ {
4124
+ "kind": "Content",
4125
+ "text": "boolean"
4126
+ },
4127
+ {
4128
+ "kind": "Content",
4129
+ "text": ";"
4130
+ }
4131
+ ],
4132
+ "isReadonly": true,
4133
+ "isOptional": true,
4134
+ "releaseTag": "Public",
4135
+ "name": "new",
4136
+ "propertyTypeTokenRange": {
4137
+ "startIndex": 1,
4138
+ "endIndex": 2
4139
+ }
4140
+ },
4141
+ {
4142
+ "kind": "PropertySignature",
4143
+ "canonicalReference": "@alloy-js/csharp!FieldModifiers#readonly:member",
4144
+ "docComment": "",
4145
+ "excerptTokens": [
4146
+ {
4147
+ "kind": "Content",
4148
+ "text": "readonly readonly?: "
4149
+ },
4150
+ {
4151
+ "kind": "Content",
4152
+ "text": "boolean"
4153
+ },
4154
+ {
4155
+ "kind": "Content",
4156
+ "text": ";"
4157
+ }
4158
+ ],
4159
+ "isReadonly": true,
4160
+ "isOptional": true,
4161
+ "releaseTag": "Public",
4162
+ "name": "readonly",
4163
+ "propertyTypeTokenRange": {
4164
+ "startIndex": 1,
4165
+ "endIndex": 2
4166
+ }
4167
+ },
4168
+ {
4169
+ "kind": "PropertySignature",
4170
+ "canonicalReference": "@alloy-js/csharp!FieldModifiers#static:member",
4171
+ "docComment": "",
4172
+ "excerptTokens": [
4173
+ {
4174
+ "kind": "Content",
4175
+ "text": "readonly static?: "
4176
+ },
4177
+ {
4178
+ "kind": "Content",
4179
+ "text": "boolean"
4180
+ },
4181
+ {
4182
+ "kind": "Content",
4183
+ "text": ";"
4184
+ }
4185
+ ],
4186
+ "isReadonly": true,
4187
+ "isOptional": true,
4188
+ "releaseTag": "Public",
4189
+ "name": "static",
4190
+ "propertyTypeTokenRange": {
4191
+ "startIndex": 1,
4192
+ "endIndex": 2
4193
+ }
4194
+ },
4195
+ {
4196
+ "kind": "PropertySignature",
4197
+ "canonicalReference": "@alloy-js/csharp!FieldModifiers#volatile:member",
4198
+ "docComment": "",
4199
+ "excerptTokens": [
4200
+ {
4201
+ "kind": "Content",
4202
+ "text": "readonly volatile?: "
4203
+ },
4204
+ {
4205
+ "kind": "Content",
4206
+ "text": "boolean"
4207
+ },
4208
+ {
4209
+ "kind": "Content",
4210
+ "text": ";"
4211
+ }
4212
+ ],
4213
+ "isReadonly": true,
4214
+ "isOptional": true,
4215
+ "releaseTag": "Public",
4216
+ "name": "volatile",
4217
+ "propertyTypeTokenRange": {
4218
+ "startIndex": 1,
4219
+ "endIndex": 2
4220
+ }
4221
+ }
4222
+ ],
4223
+ "extendsTokenRanges": []
4224
+ },
4225
+ {
4226
+ "kind": "Interface",
4227
+ "canonicalReference": "@alloy-js/csharp!FieldProps:interface",
4228
+ "docComment": "",
4229
+ "excerptTokens": [
4230
+ {
4231
+ "kind": "Content",
4232
+ "text": "export interface FieldProps extends "
4233
+ },
4234
+ {
4235
+ "kind": "Reference",
4236
+ "text": "AccessModifiers",
4237
+ "canonicalReference": "@alloy-js/csharp!AccessModifiers:interface"
4238
+ },
4239
+ {
4240
+ "kind": "Content",
4241
+ "text": ", "
4242
+ },
4243
+ {
4244
+ "kind": "Reference",
4245
+ "text": "FieldModifiers",
4246
+ "canonicalReference": "@alloy-js/csharp!FieldModifiers:interface"
4247
+ },
4248
+ {
4249
+ "kind": "Content",
4250
+ "text": " "
4251
+ }
4252
+ ],
4253
+ "fileUrlPath": "src/components/field/field.tsx",
4254
+ "releaseTag": "Public",
4255
+ "name": "FieldProps",
4256
+ "preserveMemberOrder": false,
4257
+ "members": [
4258
+ {
4259
+ "kind": "PropertySignature",
4260
+ "canonicalReference": "@alloy-js/csharp!FieldProps#doc:member",
4261
+ "docComment": "/**\n * Doc comment\n */\n",
4262
+ "excerptTokens": [
4263
+ {
4264
+ "kind": "Content",
4265
+ "text": "doc?: "
4266
+ },
4267
+ {
4268
+ "kind": "Reference",
4269
+ "text": "Children",
4270
+ "canonicalReference": "@alloy-js/core!Children:type"
4271
+ },
4272
+ {
4273
+ "kind": "Content",
4274
+ "text": ";"
4275
+ }
4276
+ ],
4277
+ "isReadonly": false,
4278
+ "isOptional": true,
4279
+ "releaseTag": "Public",
4280
+ "name": "doc",
4281
+ "propertyTypeTokenRange": {
4282
+ "startIndex": 1,
4283
+ "endIndex": 2
4284
+ }
4285
+ },
4286
+ {
4287
+ "kind": "PropertySignature",
4288
+ "canonicalReference": "@alloy-js/csharp!FieldProps#name:member",
4289
+ "docComment": "",
4290
+ "excerptTokens": [
4291
+ {
4292
+ "kind": "Content",
4293
+ "text": "name: "
4294
+ },
4295
+ {
4296
+ "kind": "Content",
4297
+ "text": "string"
4298
+ },
4299
+ {
4300
+ "kind": "Content",
4301
+ "text": ";"
4302
+ }
4303
+ ],
4304
+ "isReadonly": false,
4305
+ "isOptional": false,
4306
+ "releaseTag": "Public",
4307
+ "name": "name",
4308
+ "propertyTypeTokenRange": {
4309
+ "startIndex": 1,
4310
+ "endIndex": 2
4311
+ }
4312
+ },
4313
+ {
4314
+ "kind": "PropertySignature",
4315
+ "canonicalReference": "@alloy-js/csharp!FieldProps#refkey:member",
4316
+ "docComment": "",
4317
+ "excerptTokens": [
4318
+ {
4319
+ "kind": "Content",
4320
+ "text": "refkey?: "
4321
+ },
4322
+ {
4323
+ "kind": "Reference",
4324
+ "text": "Refkey",
4325
+ "canonicalReference": "@alloy-js/core!Refkey:type"
4326
+ },
4327
+ {
4328
+ "kind": "Content",
4329
+ "text": ";"
4330
+ }
4331
+ ],
4332
+ "isReadonly": false,
4333
+ "isOptional": true,
4334
+ "releaseTag": "Public",
4335
+ "name": "refkey",
4336
+ "propertyTypeTokenRange": {
4337
+ "startIndex": 1,
4338
+ "endIndex": 2
4339
+ }
4340
+ },
4341
+ {
4342
+ "kind": "PropertySignature",
4343
+ "canonicalReference": "@alloy-js/csharp!FieldProps#type:member",
4344
+ "docComment": "",
4345
+ "excerptTokens": [
4346
+ {
4347
+ "kind": "Content",
4348
+ "text": "type: "
4349
+ },
4350
+ {
4351
+ "kind": "Reference",
4352
+ "text": "Children",
4353
+ "canonicalReference": "@alloy-js/core!Children:type"
4354
+ },
4355
+ {
4356
+ "kind": "Content",
4357
+ "text": ";"
4358
+ }
4359
+ ],
4360
+ "isReadonly": false,
4361
+ "isOptional": false,
4362
+ "releaseTag": "Public",
4363
+ "name": "type",
4364
+ "propertyTypeTokenRange": {
4365
+ "startIndex": 1,
4366
+ "endIndex": 2
4367
+ }
4368
+ }
4369
+ ],
4370
+ "extendsTokenRanges": [
4371
+ {
4372
+ "startIndex": 1,
4373
+ "endIndex": 2
4374
+ },
4375
+ {
4376
+ "startIndex": 3,
4377
+ "endIndex": 4
4378
+ }
4379
+ ]
4380
+ },
4242
4381
  {
4243
4382
  "kind": "Function",
4244
4383
  "canonicalReference": "@alloy-js/csharp!getAccessModifier:function(1)",
@@ -8270,6 +8409,38 @@
8270
8409
  "endIndex": 2
8271
8410
  }
8272
8411
  },
8412
+ {
8413
+ "kind": "PropertySignature",
8414
+ "canonicalReference": "@alloy-js/csharp!StructDeclarationProps#interfaceTypes:member",
8415
+ "docComment": "/**\n * Interfaces this struct implements\n */\n",
8416
+ "excerptTokens": [
8417
+ {
8418
+ "kind": "Content",
8419
+ "text": "interfaceTypes?: "
8420
+ },
8421
+ {
8422
+ "kind": "Reference",
8423
+ "text": "core.Children",
8424
+ "canonicalReference": "@alloy-js/core!Children:type"
8425
+ },
8426
+ {
8427
+ "kind": "Content",
8428
+ "text": "[]"
8429
+ },
8430
+ {
8431
+ "kind": "Content",
8432
+ "text": ";"
8433
+ }
8434
+ ],
8435
+ "isReadonly": false,
8436
+ "isOptional": true,
8437
+ "releaseTag": "Public",
8438
+ "name": "interfaceTypes",
8439
+ "propertyTypeTokenRange": {
8440
+ "startIndex": 1,
8441
+ "endIndex": 3
8442
+ }
8443
+ },
8273
8444
  {
8274
8445
  "kind": "PropertySignature",
8275
8446
  "canonicalReference": "@alloy-js/csharp!StructDeclarationProps#name:member",
@@ -3,15 +3,11 @@ import { List, refkey } from "@alloy-js/core";
3
3
  import * as coretest from "@alloy-js/core/testing";
4
4
  import { describe, expect, it } from "vitest";
5
5
  import { Attribute } from "../src/components/attributes/attributes.jsx";
6
+ import { Field } from "../src/components/field/field.jsx";
6
7
  import { Constructor } from "../src/components/stc/index.js";
7
8
  import { TypeParameterProps } from "../src/components/type-parameters/type-parameter.jsx";
8
9
  import * as csharp from "../src/index.js";
9
- import {
10
- ClassDeclaration,
11
- ClassMember,
12
- Property,
13
- SourceFile,
14
- } from "../src/index.js";
10
+ import { ClassDeclaration, Property, SourceFile } from "../src/index.js";
15
11
  import * as utils from "./utils.jsx";
16
12
 
17
13
  it("declares class with no members", () => {
@@ -98,10 +94,10 @@ describe("base", () => {
98
94
  it("declares class with some members", () => {
99
95
  const res = utils.toSourceText(
100
96
  <csharp.ClassDeclaration public name="TestClass">
101
- <core.StatementList>
102
- <csharp.ClassMember public name="MemberOne" type="string" />
103
- <csharp.ClassMember private name="MemberTwo" type="int" />
104
- </core.StatementList>
97
+ <List>
98
+ <Field public name="MemberOne" type="string" />
99
+ <Field public name="MemberTwo" type="int" />
100
+ </List>
105
101
  </csharp.ClassDeclaration>,
106
102
  );
107
103
 
@@ -111,7 +107,7 @@ it("declares class with some members", () => {
111
107
  public class TestClass
112
108
  {
113
109
  public string MemberOne;
114
- private int memberTwo;
110
+ public int MemberTwo;
115
111
  }
116
112
  }
117
113
  `);
@@ -183,12 +179,7 @@ it("uses refkeys for members, params, and return type", () => {
183
179
  />
184
180
  <hbr />
185
181
  <csharp.ClassDeclaration public name="TestClass">
186
- <csharp.ClassMember
187
- private
188
- name="MemberOne"
189
- type={enumTypeRefkey}
190
- />
191
- ;
182
+ <Field private name="MemberOne" type={enumTypeRefkey} />
192
183
  <hbr />
193
184
  <csharp.Method
194
185
  public
@@ -216,7 +207,7 @@ it("uses refkeys for members, params, and return type", () => {
216
207
  public class TestResult;
217
208
  public class TestClass
218
209
  {
219
- private TestEnum memberOne;
210
+ private TestEnum _memberOne;
220
211
  public TestResult MethodOne(int intParam, TestInput bodyParam)
221
212
  {
222
213
  return new TestResult();
@@ -351,20 +342,10 @@ it("declares class with constructor params and assigns values to fields", () =>
351
342
 
352
343
  const res = utils.toSourceText(
353
344
  <csharp.ClassDeclaration public name="TestClass">
354
- <csharp.ClassMember
355
- private
356
- name="name"
357
- type="string"
358
- refkey={thisNameRefkey}
359
- />
360
- ;<hbr />
361
- <csharp.ClassMember
362
- private
363
- name="size"
364
- type="int"
365
- refkey={thisSizeRefkey}
366
- />
367
- ;<hbr />
345
+ <Field private name="name" type="string" refkey={thisNameRefkey} />
346
+ <hbr />
347
+ <Field private name="size" type="int" refkey={thisSizeRefkey} />
348
+ <hbr />
368
349
  <Constructor public parameters={ctorParams}>
369
350
  {thisNameRefkey} = {paramNameRefkey};<hbr />
370
351
  {thisSizeRefkey} = {paramSizeRefkey};
@@ -379,12 +360,12 @@ it("declares class with constructor params and assigns values to fields", () =>
379
360
  {
380
361
  public class TestClass
381
362
  {
382
- private string name;
383
- private int size;
363
+ private string _name;
364
+ private int _size;
384
365
  public TestClass(string name, int size)
385
366
  {
386
- name = name;
387
- size = size;
367
+ _name = name;
368
+ _size = size;
388
369
  }
389
370
  }
390
371
  }
@@ -406,7 +387,7 @@ it("supports class member doc comments", () => {
406
387
  expect(
407
388
  <utils.TestNamespace>
408
389
  <ClassDeclaration name="Test" doc="This is a test">
409
- <ClassMember name="Member" public type="int" doc="This is a member" />
390
+ <Field name="Member" public type="int" doc="This is a member" />
410
391
  </ClassDeclaration>
411
392
  </utils.TestNamespace>,
412
393
  ).toRenderTo(`
@@ -414,7 +395,7 @@ it("supports class member doc comments", () => {
414
395
  class Test
415
396
  {
416
397
  /// This is a member
417
- public int Member
398
+ public int Member;
418
399
  }
419
400
  `);
420
401
  });