@alloy-js/csharp 0.18.0-dev.22 → 0.18.0-dev.24
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.
- package/dist/src/components/ClassDeclaration.d.ts +18 -0
- package/dist/src/components/ClassDeclaration.d.ts.map +1 -1
- package/dist/src/components/ClassDeclaration.js +6 -0
- package/dist/src/components/ClassMethod.d.ts +18 -0
- package/dist/src/components/ClassMethod.d.ts.map +1 -1
- package/dist/src/components/ClassMethod.js +6 -0
- package/dist/src/components/SourceFile.d.ts.map +1 -1
- package/dist/src/components/SourceFile.js +1 -0
- package/dist/src/components/attributes/attributes.d.ts +39 -0
- package/dist/src/components/attributes/attributes.d.ts.map +1 -0
- package/dist/src/components/attributes/attributes.js +62 -0
- package/dist/src/components/attributes/attributes.test.d.ts +2 -0
- package/dist/src/components/attributes/attributes.test.d.ts.map +1 -0
- package/dist/src/components/attributes/attributes.test.js +75 -0
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +1 -0
- package/dist/src/components/interface/declaration.d.ts +18 -0
- package/dist/src/components/interface/declaration.d.ts.map +1 -1
- package/dist/src/components/interface/declaration.js +6 -0
- package/dist/src/components/interface/declaration.test.js +18 -0
- package/dist/src/components/interface/method.d.ts +18 -0
- package/dist/src/components/interface/method.d.ts.map +1 -1
- package/dist/src/components/interface/method.js +6 -0
- package/dist/src/components/interface/method.test.js +21 -0
- package/dist/src/components/interface/property.d.ts +18 -0
- package/dist/src/components/interface/property.d.ts.map +1 -1
- package/dist/src/components/interface/property.js +6 -0
- package/dist/src/components/interface/property.test.js +24 -0
- package/dist/src/components/property/property.d.ts +18 -0
- package/dist/src/components/property/property.d.ts.map +1 -1
- package/dist/src/components/property/property.js +6 -0
- package/dist/src/components/property/property.test.js +24 -0
- package/dist/test/class-declaration.test.js +18 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/components/ClassDeclaration.tsx +20 -0
- package/src/components/ClassMethod.tsx +20 -0
- package/src/components/SourceFile.tsx +1 -0
- package/src/components/attributes/attributes.test.tsx +61 -0
- package/src/components/attributes/attributes.tsx +100 -0
- package/src/components/index.ts +1 -0
- package/src/components/interface/declaration.test.tsx +15 -0
- package/src/components/interface/declaration.tsx +20 -0
- package/src/components/interface/method.test.tsx +15 -0
- package/src/components/interface/method.tsx +20 -0
- package/src/components/interface/property.test.tsx +21 -0
- package/src/components/interface/property.tsx +20 -0
- package/src/components/property/property.test.tsx +21 -0
- package/src/components/property/property.tsx +20 -0
- package/temp/api.json +596 -0
- package/test/class-declaration.test.tsx +12 -0
package/temp/api.json
CHANGED
|
@@ -325,6 +325,434 @@
|
|
|
325
325
|
],
|
|
326
326
|
"extendsTokenRanges": []
|
|
327
327
|
},
|
|
328
|
+
{
|
|
329
|
+
"kind": "Variable",
|
|
330
|
+
"canonicalReference": "@alloy-js/csharp!Attribute:var",
|
|
331
|
+
"docComment": "/**\n * Render a csharp attribute.\n *\n * @example\n * ```tsx\n * <Attribute name=\"Test\" /><hbr/>\n * <Attribute name=\"Test\" args={[\"arg1\", \"arg2\"]} />\n * ```\n *\n *\n * will render:\n * ```csharp\n * [Test]\n * [Test(\"arg1\", \"arg2\")]\n * ```\n *\n */\n",
|
|
332
|
+
"excerptTokens": [
|
|
333
|
+
{
|
|
334
|
+
"kind": "Content",
|
|
335
|
+
"text": "Attribute: "
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"kind": "Content",
|
|
339
|
+
"text": "import(\"@alloy-js/core\")."
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"kind": "Reference",
|
|
343
|
+
"text": "Component",
|
|
344
|
+
"canonicalReference": "@alloy-js/core!Component:interface"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"kind": "Content",
|
|
348
|
+
"text": "<"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"kind": "Reference",
|
|
352
|
+
"text": "AttributeProps",
|
|
353
|
+
"canonicalReference": "@alloy-js/csharp!AttributeProps:interface"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"kind": "Content",
|
|
357
|
+
"text": "> & "
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"kind": "Reference",
|
|
361
|
+
"text": "Required",
|
|
362
|
+
"canonicalReference": "!Required:type"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"kind": "Content",
|
|
366
|
+
"text": "<"
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"kind": "Reference",
|
|
370
|
+
"text": "Pick",
|
|
371
|
+
"canonicalReference": "!Pick:type"
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"kind": "Content",
|
|
375
|
+
"text": "<import(\"@alloy-js/core\")."
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"kind": "Reference",
|
|
379
|
+
"text": "Component",
|
|
380
|
+
"canonicalReference": "@alloy-js/core!Component:interface"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"kind": "Content",
|
|
384
|
+
"text": "<"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"kind": "Reference",
|
|
388
|
+
"text": "AttributeProps",
|
|
389
|
+
"canonicalReference": "@alloy-js/csharp!AttributeProps:interface"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"kind": "Content",
|
|
393
|
+
"text": ">, \"tag\">>"
|
|
394
|
+
}
|
|
395
|
+
],
|
|
396
|
+
"fileUrlPath": "src/components/attributes/attributes.tsx",
|
|
397
|
+
"isReadonly": true,
|
|
398
|
+
"releaseTag": "Public",
|
|
399
|
+
"name": "Attribute",
|
|
400
|
+
"variableTypeTokenRange": {
|
|
401
|
+
"startIndex": 1,
|
|
402
|
+
"endIndex": 14
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
"kind": "Interface",
|
|
407
|
+
"canonicalReference": "@alloy-js/csharp!AttributeItem:interface",
|
|
408
|
+
"docComment": "",
|
|
409
|
+
"excerptTokens": [
|
|
410
|
+
{
|
|
411
|
+
"kind": "Content",
|
|
412
|
+
"text": "export interface AttributeItem "
|
|
413
|
+
}
|
|
414
|
+
],
|
|
415
|
+
"fileUrlPath": "src/components/attributes/attributes.tsx",
|
|
416
|
+
"releaseTag": "Public",
|
|
417
|
+
"name": "AttributeItem",
|
|
418
|
+
"preserveMemberOrder": false,
|
|
419
|
+
"members": [
|
|
420
|
+
{
|
|
421
|
+
"kind": "PropertySignature",
|
|
422
|
+
"canonicalReference": "@alloy-js/csharp!AttributeItem#args:member",
|
|
423
|
+
"docComment": "",
|
|
424
|
+
"excerptTokens": [
|
|
425
|
+
{
|
|
426
|
+
"kind": "Content",
|
|
427
|
+
"text": "args?: "
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"kind": "Content",
|
|
431
|
+
"text": "string[]"
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"kind": "Content",
|
|
435
|
+
"text": ";"
|
|
436
|
+
}
|
|
437
|
+
],
|
|
438
|
+
"isReadonly": false,
|
|
439
|
+
"isOptional": true,
|
|
440
|
+
"releaseTag": "Public",
|
|
441
|
+
"name": "args",
|
|
442
|
+
"propertyTypeTokenRange": {
|
|
443
|
+
"startIndex": 1,
|
|
444
|
+
"endIndex": 2
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
"kind": "PropertySignature",
|
|
449
|
+
"canonicalReference": "@alloy-js/csharp!AttributeItem#name:member",
|
|
450
|
+
"docComment": "",
|
|
451
|
+
"excerptTokens": [
|
|
452
|
+
{
|
|
453
|
+
"kind": "Content",
|
|
454
|
+
"text": "name: "
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"kind": "Content",
|
|
458
|
+
"text": "string"
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"kind": "Content",
|
|
462
|
+
"text": ";"
|
|
463
|
+
}
|
|
464
|
+
],
|
|
465
|
+
"isReadonly": false,
|
|
466
|
+
"isOptional": false,
|
|
467
|
+
"releaseTag": "Public",
|
|
468
|
+
"name": "name",
|
|
469
|
+
"propertyTypeTokenRange": {
|
|
470
|
+
"startIndex": 1,
|
|
471
|
+
"endIndex": 2
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
],
|
|
475
|
+
"extendsTokenRanges": []
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
"kind": "Function",
|
|
479
|
+
"canonicalReference": "@alloy-js/csharp!AttributeList:function(1)",
|
|
480
|
+
"docComment": "/**\n * Render each attributes in a new line.\n */\n",
|
|
481
|
+
"excerptTokens": [
|
|
482
|
+
{
|
|
483
|
+
"kind": "Content",
|
|
484
|
+
"text": "export declare function AttributeList(props: "
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"kind": "Reference",
|
|
488
|
+
"text": "AttributeListProps",
|
|
489
|
+
"canonicalReference": "@alloy-js/csharp!AttributeListProps:interface"
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
"kind": "Content",
|
|
493
|
+
"text": "): "
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
"kind": "Reference",
|
|
497
|
+
"text": "Children",
|
|
498
|
+
"canonicalReference": "@alloy-js/core!Children:type"
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
"kind": "Content",
|
|
502
|
+
"text": ";"
|
|
503
|
+
}
|
|
504
|
+
],
|
|
505
|
+
"fileUrlPath": "src/components/attributes/attributes.tsx",
|
|
506
|
+
"returnTypeTokenRange": {
|
|
507
|
+
"startIndex": 3,
|
|
508
|
+
"endIndex": 4
|
|
509
|
+
},
|
|
510
|
+
"releaseTag": "Public",
|
|
511
|
+
"overloadIndex": 1,
|
|
512
|
+
"parameters": [
|
|
513
|
+
{
|
|
514
|
+
"parameterName": "props",
|
|
515
|
+
"parameterTypeTokenRange": {
|
|
516
|
+
"startIndex": 1,
|
|
517
|
+
"endIndex": 2
|
|
518
|
+
},
|
|
519
|
+
"isOptional": false
|
|
520
|
+
}
|
|
521
|
+
],
|
|
522
|
+
"name": "AttributeList"
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"kind": "Interface",
|
|
526
|
+
"canonicalReference": "@alloy-js/csharp!AttributeListProps:interface",
|
|
527
|
+
"docComment": "",
|
|
528
|
+
"excerptTokens": [
|
|
529
|
+
{
|
|
530
|
+
"kind": "Content",
|
|
531
|
+
"text": "export interface AttributeListProps "
|
|
532
|
+
}
|
|
533
|
+
],
|
|
534
|
+
"fileUrlPath": "src/components/attributes/attributes.tsx",
|
|
535
|
+
"releaseTag": "Public",
|
|
536
|
+
"name": "AttributeListProps",
|
|
537
|
+
"preserveMemberOrder": false,
|
|
538
|
+
"members": [
|
|
539
|
+
{
|
|
540
|
+
"kind": "PropertySignature",
|
|
541
|
+
"canonicalReference": "@alloy-js/csharp!AttributeListProps#attributes:member",
|
|
542
|
+
"docComment": "",
|
|
543
|
+
"excerptTokens": [
|
|
544
|
+
{
|
|
545
|
+
"kind": "Content",
|
|
546
|
+
"text": "attributes?: "
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
"kind": "Reference",
|
|
550
|
+
"text": "AttributesProp",
|
|
551
|
+
"canonicalReference": "@alloy-js/csharp!AttributesProp:type"
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
"kind": "Content",
|
|
555
|
+
"text": ";"
|
|
556
|
+
}
|
|
557
|
+
],
|
|
558
|
+
"isReadonly": false,
|
|
559
|
+
"isOptional": true,
|
|
560
|
+
"releaseTag": "Public",
|
|
561
|
+
"name": "attributes",
|
|
562
|
+
"propertyTypeTokenRange": {
|
|
563
|
+
"startIndex": 1,
|
|
564
|
+
"endIndex": 2
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"kind": "PropertySignature",
|
|
569
|
+
"canonicalReference": "@alloy-js/csharp!AttributeListProps#children:member",
|
|
570
|
+
"docComment": "",
|
|
571
|
+
"excerptTokens": [
|
|
572
|
+
{
|
|
573
|
+
"kind": "Content",
|
|
574
|
+
"text": "children?: "
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
"kind": "Reference",
|
|
578
|
+
"text": "Children",
|
|
579
|
+
"canonicalReference": "@alloy-js/core!Children:type"
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
"kind": "Content",
|
|
583
|
+
"text": "[]"
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
"kind": "Content",
|
|
587
|
+
"text": ";"
|
|
588
|
+
}
|
|
589
|
+
],
|
|
590
|
+
"isReadonly": false,
|
|
591
|
+
"isOptional": true,
|
|
592
|
+
"releaseTag": "Public",
|
|
593
|
+
"name": "children",
|
|
594
|
+
"propertyTypeTokenRange": {
|
|
595
|
+
"startIndex": 1,
|
|
596
|
+
"endIndex": 3
|
|
597
|
+
}
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
"kind": "PropertySignature",
|
|
601
|
+
"canonicalReference": "@alloy-js/csharp!AttributeListProps#endline:member",
|
|
602
|
+
"docComment": "/**\n * If the attribute list should finish with a hard line if there is any attribute\n */\n",
|
|
603
|
+
"excerptTokens": [
|
|
604
|
+
{
|
|
605
|
+
"kind": "Content",
|
|
606
|
+
"text": "endline?: "
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
"kind": "Content",
|
|
610
|
+
"text": "boolean"
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
"kind": "Content",
|
|
614
|
+
"text": ";"
|
|
615
|
+
}
|
|
616
|
+
],
|
|
617
|
+
"isReadonly": false,
|
|
618
|
+
"isOptional": true,
|
|
619
|
+
"releaseTag": "Public",
|
|
620
|
+
"name": "endline",
|
|
621
|
+
"propertyTypeTokenRange": {
|
|
622
|
+
"startIndex": 1,
|
|
623
|
+
"endIndex": 2
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
],
|
|
627
|
+
"extendsTokenRanges": []
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
"kind": "Interface",
|
|
631
|
+
"canonicalReference": "@alloy-js/csharp!AttributeProps:interface",
|
|
632
|
+
"docComment": "",
|
|
633
|
+
"excerptTokens": [
|
|
634
|
+
{
|
|
635
|
+
"kind": "Content",
|
|
636
|
+
"text": "export interface AttributeProps "
|
|
637
|
+
}
|
|
638
|
+
],
|
|
639
|
+
"fileUrlPath": "src/components/attributes/attributes.tsx",
|
|
640
|
+
"releaseTag": "Public",
|
|
641
|
+
"name": "AttributeProps",
|
|
642
|
+
"preserveMemberOrder": false,
|
|
643
|
+
"members": [
|
|
644
|
+
{
|
|
645
|
+
"kind": "PropertySignature",
|
|
646
|
+
"canonicalReference": "@alloy-js/csharp!AttributeProps#args:member",
|
|
647
|
+
"docComment": "/**\n * Argument\n */\n",
|
|
648
|
+
"excerptTokens": [
|
|
649
|
+
{
|
|
650
|
+
"kind": "Content",
|
|
651
|
+
"text": "args?: "
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
"kind": "Reference",
|
|
655
|
+
"text": "Children",
|
|
656
|
+
"canonicalReference": "@alloy-js/core!Children:type"
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"kind": "Content",
|
|
660
|
+
"text": "[]"
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
"kind": "Content",
|
|
664
|
+
"text": ";"
|
|
665
|
+
}
|
|
666
|
+
],
|
|
667
|
+
"isReadonly": false,
|
|
668
|
+
"isOptional": true,
|
|
669
|
+
"releaseTag": "Public",
|
|
670
|
+
"name": "args",
|
|
671
|
+
"propertyTypeTokenRange": {
|
|
672
|
+
"startIndex": 1,
|
|
673
|
+
"endIndex": 3
|
|
674
|
+
}
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
"kind": "PropertySignature",
|
|
678
|
+
"canonicalReference": "@alloy-js/csharp!AttributeProps#name:member",
|
|
679
|
+
"docComment": "/**\n * Attribute name\n */\n",
|
|
680
|
+
"excerptTokens": [
|
|
681
|
+
{
|
|
682
|
+
"kind": "Content",
|
|
683
|
+
"text": "name: "
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
"kind": "Reference",
|
|
687
|
+
"text": "Children",
|
|
688
|
+
"canonicalReference": "@alloy-js/core!Children:type"
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
"kind": "Content",
|
|
692
|
+
"text": ";"
|
|
693
|
+
}
|
|
694
|
+
],
|
|
695
|
+
"isReadonly": false,
|
|
696
|
+
"isOptional": false,
|
|
697
|
+
"releaseTag": "Public",
|
|
698
|
+
"name": "name",
|
|
699
|
+
"propertyTypeTokenRange": {
|
|
700
|
+
"startIndex": 1,
|
|
701
|
+
"endIndex": 2
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
],
|
|
705
|
+
"extendsTokenRanges": []
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
"kind": "TypeAlias",
|
|
709
|
+
"canonicalReference": "@alloy-js/csharp!AttributesProp:type",
|
|
710
|
+
"docComment": "",
|
|
711
|
+
"excerptTokens": [
|
|
712
|
+
{
|
|
713
|
+
"kind": "Content",
|
|
714
|
+
"text": "export type AttributesProp = "
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
"kind": "Reference",
|
|
718
|
+
"text": "Array",
|
|
719
|
+
"canonicalReference": "!Array:interface"
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
"kind": "Content",
|
|
723
|
+
"text": "<string | "
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
"kind": "Reference",
|
|
727
|
+
"text": "AttributeProps",
|
|
728
|
+
"canonicalReference": "@alloy-js/csharp!AttributeProps:interface"
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
"kind": "Content",
|
|
732
|
+
"text": " | "
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
"kind": "Reference",
|
|
736
|
+
"text": "Children",
|
|
737
|
+
"canonicalReference": "@alloy-js/core!Children:type"
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
"kind": "Content",
|
|
741
|
+
"text": ">"
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
"kind": "Content",
|
|
745
|
+
"text": ";"
|
|
746
|
+
}
|
|
747
|
+
],
|
|
748
|
+
"fileUrlPath": "src/components/attributes/attributes.tsx",
|
|
749
|
+
"releaseTag": "Public",
|
|
750
|
+
"name": "AttributesProp",
|
|
751
|
+
"typeTokenRange": {
|
|
752
|
+
"startIndex": 1,
|
|
753
|
+
"endIndex": 7
|
|
754
|
+
}
|
|
755
|
+
},
|
|
328
756
|
{
|
|
329
757
|
"kind": "Function",
|
|
330
758
|
"canonicalReference": "@alloy-js/csharp!ClassConstructor:function(1)",
|
|
@@ -631,6 +1059,34 @@
|
|
|
631
1059
|
"name": "ClassDeclarationProps",
|
|
632
1060
|
"preserveMemberOrder": false,
|
|
633
1061
|
"members": [
|
|
1062
|
+
{
|
|
1063
|
+
"kind": "PropertySignature",
|
|
1064
|
+
"canonicalReference": "@alloy-js/csharp!ClassDeclarationProps#attributes:member",
|
|
1065
|
+
"docComment": "/**\n * Define attributes to attach\n *\n * @example\n * ```tsx\n * <ClassDeclaration name=\"MyClass\" attributes={[\n * <Attribute name=\"Test\" />\n * <Attribute name=\"Test2\" args={[\"arg1\", \"arg2\"]} />\n * ]}>\n * ```\n *\n * This will produce:\n * ```csharp\n * [Test]\n * [Test2(\"arg1\", \"arg2\")]\n * public class MyClass\n * ```\n *\n */\n",
|
|
1066
|
+
"excerptTokens": [
|
|
1067
|
+
{
|
|
1068
|
+
"kind": "Content",
|
|
1069
|
+
"text": "attributes?: "
|
|
1070
|
+
},
|
|
1071
|
+
{
|
|
1072
|
+
"kind": "Reference",
|
|
1073
|
+
"text": "AttributesProp",
|
|
1074
|
+
"canonicalReference": "@alloy-js/csharp!AttributesProp:type"
|
|
1075
|
+
},
|
|
1076
|
+
{
|
|
1077
|
+
"kind": "Content",
|
|
1078
|
+
"text": ";"
|
|
1079
|
+
}
|
|
1080
|
+
],
|
|
1081
|
+
"isReadonly": false,
|
|
1082
|
+
"isOptional": true,
|
|
1083
|
+
"releaseTag": "Public",
|
|
1084
|
+
"name": "attributes",
|
|
1085
|
+
"propertyTypeTokenRange": {
|
|
1086
|
+
"startIndex": 1,
|
|
1087
|
+
"endIndex": 2
|
|
1088
|
+
}
|
|
1089
|
+
},
|
|
634
1090
|
{
|
|
635
1091
|
"kind": "PropertySignature",
|
|
636
1092
|
"canonicalReference": "@alloy-js/csharp!ClassDeclarationProps#baseType:member",
|
|
@@ -1249,6 +1705,34 @@
|
|
|
1249
1705
|
"endIndex": 2
|
|
1250
1706
|
}
|
|
1251
1707
|
},
|
|
1708
|
+
{
|
|
1709
|
+
"kind": "PropertySignature",
|
|
1710
|
+
"canonicalReference": "@alloy-js/csharp!ClassMethodProps#attributes:member",
|
|
1711
|
+
"docComment": "/**\n * Define attributes to attach\n *\n * @example\n * ```tsx\n * <ClassMethod name=\"MyMethod\" attributes={[\n * <Attribute name=\"Test\" />\n * <Attribute name=\"Test2\" args={[\"arg1\", \"arg2\"]} />\n * ]} />\n * ```\n *\n * This will produce:\n * ```csharp\n * [Test]\n * [Test2(\"arg1\", \"arg2\")]\n * public void MyMethod() { }\n * ```\n *\n */\n",
|
|
1712
|
+
"excerptTokens": [
|
|
1713
|
+
{
|
|
1714
|
+
"kind": "Content",
|
|
1715
|
+
"text": "attributes?: "
|
|
1716
|
+
},
|
|
1717
|
+
{
|
|
1718
|
+
"kind": "Reference",
|
|
1719
|
+
"text": "AttributesProp",
|
|
1720
|
+
"canonicalReference": "@alloy-js/csharp!AttributesProp:type"
|
|
1721
|
+
},
|
|
1722
|
+
{
|
|
1723
|
+
"kind": "Content",
|
|
1724
|
+
"text": ";"
|
|
1725
|
+
}
|
|
1726
|
+
],
|
|
1727
|
+
"isReadonly": false,
|
|
1728
|
+
"isOptional": true,
|
|
1729
|
+
"releaseTag": "Public",
|
|
1730
|
+
"name": "attributes",
|
|
1731
|
+
"propertyTypeTokenRange": {
|
|
1732
|
+
"startIndex": 1,
|
|
1733
|
+
"endIndex": 2
|
|
1734
|
+
}
|
|
1735
|
+
},
|
|
1252
1736
|
{
|
|
1253
1737
|
"kind": "PropertySignature",
|
|
1254
1738
|
"canonicalReference": "@alloy-js/csharp!ClassMethodProps#children:member",
|
|
@@ -4470,6 +4954,34 @@
|
|
|
4470
4954
|
"name": "InterfaceDeclarationProps",
|
|
4471
4955
|
"preserveMemberOrder": false,
|
|
4472
4956
|
"members": [
|
|
4957
|
+
{
|
|
4958
|
+
"kind": "PropertySignature",
|
|
4959
|
+
"canonicalReference": "@alloy-js/csharp!InterfaceDeclarationProps#attributes:member",
|
|
4960
|
+
"docComment": "/**\n * Define attributes to attach\n *\n * @example\n * ```tsx\n * <InterfaceDeclaration name=\"MyInterface\" attributes={[\n * <Attribute name=\"Test\" />\n * <Attribute name=\"Test2\" args={[\"arg1\", \"arg2\"]} />\n * ]} />\n * ```\n *\n * This will produce:\n * ```csharp\n * [Test]\n * [Test2(\"arg1\", \"arg2\")]\n * public interface MyInterface\n * ```\n *\n */\n",
|
|
4961
|
+
"excerptTokens": [
|
|
4962
|
+
{
|
|
4963
|
+
"kind": "Content",
|
|
4964
|
+
"text": "attributes?: "
|
|
4965
|
+
},
|
|
4966
|
+
{
|
|
4967
|
+
"kind": "Reference",
|
|
4968
|
+
"text": "AttributesProp",
|
|
4969
|
+
"canonicalReference": "@alloy-js/csharp!AttributesProp:type"
|
|
4970
|
+
},
|
|
4971
|
+
{
|
|
4972
|
+
"kind": "Content",
|
|
4973
|
+
"text": ";"
|
|
4974
|
+
}
|
|
4975
|
+
],
|
|
4976
|
+
"isReadonly": false,
|
|
4977
|
+
"isOptional": true,
|
|
4978
|
+
"releaseTag": "Public",
|
|
4979
|
+
"name": "attributes",
|
|
4980
|
+
"propertyTypeTokenRange": {
|
|
4981
|
+
"startIndex": 1,
|
|
4982
|
+
"endIndex": 2
|
|
4983
|
+
}
|
|
4984
|
+
},
|
|
4473
4985
|
{
|
|
4474
4986
|
"kind": "PropertySignature",
|
|
4475
4987
|
"canonicalReference": "@alloy-js/csharp!InterfaceDeclarationProps#doc:member",
|
|
@@ -4730,6 +5242,34 @@
|
|
|
4730
5242
|
"name": "InterfaceMethodProps",
|
|
4731
5243
|
"preserveMemberOrder": false,
|
|
4732
5244
|
"members": [
|
|
5245
|
+
{
|
|
5246
|
+
"kind": "PropertySignature",
|
|
5247
|
+
"canonicalReference": "@alloy-js/csharp!InterfaceMethodProps#attributes:member",
|
|
5248
|
+
"docComment": "/**\n * Define attributes to attach\n *\n * @example\n * ```tsx\n * <InterfaceMethod name=\"MyMethod\" attributes={[\n * <Attribute name=\"Test\" />\n * <Attribute name=\"Test2\" args={[\"arg1\", \"arg2\"]} />\n * ]} />\n * ```\n *\n * This will produce:\n * ```csharp\n * [Test]\n * [Test2(\"arg1\", \"arg2\")]\n * void MyMethod();\n * ```\n *\n */\n",
|
|
5249
|
+
"excerptTokens": [
|
|
5250
|
+
{
|
|
5251
|
+
"kind": "Content",
|
|
5252
|
+
"text": "attributes?: "
|
|
5253
|
+
},
|
|
5254
|
+
{
|
|
5255
|
+
"kind": "Reference",
|
|
5256
|
+
"text": "AttributesProp",
|
|
5257
|
+
"canonicalReference": "@alloy-js/csharp!AttributesProp:type"
|
|
5258
|
+
},
|
|
5259
|
+
{
|
|
5260
|
+
"kind": "Content",
|
|
5261
|
+
"text": ";"
|
|
5262
|
+
}
|
|
5263
|
+
],
|
|
5264
|
+
"isReadonly": false,
|
|
5265
|
+
"isOptional": true,
|
|
5266
|
+
"releaseTag": "Public",
|
|
5267
|
+
"name": "attributes",
|
|
5268
|
+
"propertyTypeTokenRange": {
|
|
5269
|
+
"startIndex": 1,
|
|
5270
|
+
"endIndex": 2
|
|
5271
|
+
}
|
|
5272
|
+
},
|
|
4733
5273
|
{
|
|
4734
5274
|
"kind": "PropertySignature",
|
|
4735
5275
|
"canonicalReference": "@alloy-js/csharp!InterfaceMethodProps#children:member",
|
|
@@ -5128,6 +5668,34 @@
|
|
|
5128
5668
|
"name": "InterfacePropertyProps",
|
|
5129
5669
|
"preserveMemberOrder": false,
|
|
5130
5670
|
"members": [
|
|
5671
|
+
{
|
|
5672
|
+
"kind": "PropertySignature",
|
|
5673
|
+
"canonicalReference": "@alloy-js/csharp!InterfacePropertyProps#attributes:member",
|
|
5674
|
+
"docComment": "/**\n * Define attributes to attach\n *\n * @example\n * ```tsx\n * <InterfaceProperty name=\"MyProp\" attributes={[\n * <Attribute name=\"Test\" />\n * <Attribute name=\"Test2\" args={[\"arg1\", \"arg2\"]} />\n * ]} />\n * ```\n *\n * This will produce:\n * ```csharp\n * [Test]\n * [Test2(\"arg1\", \"arg2\")]\n * int MyProp { get; set; }\n * ```\n *\n */\n",
|
|
5675
|
+
"excerptTokens": [
|
|
5676
|
+
{
|
|
5677
|
+
"kind": "Content",
|
|
5678
|
+
"text": "attributes?: "
|
|
5679
|
+
},
|
|
5680
|
+
{
|
|
5681
|
+
"kind": "Reference",
|
|
5682
|
+
"text": "AttributesProp",
|
|
5683
|
+
"canonicalReference": "@alloy-js/csharp!AttributesProp:type"
|
|
5684
|
+
},
|
|
5685
|
+
{
|
|
5686
|
+
"kind": "Content",
|
|
5687
|
+
"text": ";"
|
|
5688
|
+
}
|
|
5689
|
+
],
|
|
5690
|
+
"isReadonly": false,
|
|
5691
|
+
"isOptional": true,
|
|
5692
|
+
"releaseTag": "Public",
|
|
5693
|
+
"name": "attributes",
|
|
5694
|
+
"propertyTypeTokenRange": {
|
|
5695
|
+
"startIndex": 1,
|
|
5696
|
+
"endIndex": 2
|
|
5697
|
+
}
|
|
5698
|
+
},
|
|
5131
5699
|
{
|
|
5132
5700
|
"kind": "PropertySignature",
|
|
5133
5701
|
"canonicalReference": "@alloy-js/csharp!InterfacePropertyProps#doc:member",
|
|
@@ -6626,6 +7194,34 @@
|
|
|
6626
7194
|
"name": "PropertyProps",
|
|
6627
7195
|
"preserveMemberOrder": false,
|
|
6628
7196
|
"members": [
|
|
7197
|
+
{
|
|
7198
|
+
"kind": "PropertySignature",
|
|
7199
|
+
"canonicalReference": "@alloy-js/csharp!PropertyProps#attributes:member",
|
|
7200
|
+
"docComment": "/**\n * Define attributes to attach\n *\n * @example\n * ```tsx\n * <Property name=\"MyProp\" attributes={[\n * <Attribute name=\"Test\" />\n * <Attribute name=\"Test2\" args={[\"arg1\", \"arg2\"]} />\n * ]} />\n * ```\n *\n * This will produce:\n * ```csharp\n * [Test]\n * [Test2(\"arg1\", \"arg2\")]\n * int MyProp { get; set; }\n * ```\n *\n */\n",
|
|
7201
|
+
"excerptTokens": [
|
|
7202
|
+
{
|
|
7203
|
+
"kind": "Content",
|
|
7204
|
+
"text": "attributes?: "
|
|
7205
|
+
},
|
|
7206
|
+
{
|
|
7207
|
+
"kind": "Reference",
|
|
7208
|
+
"text": "AttributesProp",
|
|
7209
|
+
"canonicalReference": "@alloy-js/csharp!AttributesProp:type"
|
|
7210
|
+
},
|
|
7211
|
+
{
|
|
7212
|
+
"kind": "Content",
|
|
7213
|
+
"text": ";"
|
|
7214
|
+
}
|
|
7215
|
+
],
|
|
7216
|
+
"isReadonly": false,
|
|
7217
|
+
"isOptional": true,
|
|
7218
|
+
"releaseTag": "Public",
|
|
7219
|
+
"name": "attributes",
|
|
7220
|
+
"propertyTypeTokenRange": {
|
|
7221
|
+
"startIndex": 1,
|
|
7222
|
+
"endIndex": 2
|
|
7223
|
+
}
|
|
7224
|
+
},
|
|
6629
7225
|
{
|
|
6630
7226
|
"kind": "PropertySignature",
|
|
6631
7227
|
"canonicalReference": "@alloy-js/csharp!PropertyProps#doc:member",
|
|
@@ -2,6 +2,7 @@ import * as core from "@alloy-js/core";
|
|
|
2
2
|
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
|
+
import { Attribute } from "../src/components/attributes/attributes.jsx";
|
|
5
6
|
import { TypeParameterProps } from "../src/components/type-parameters/type-parameter.jsx";
|
|
6
7
|
import * as csharp from "../src/index.js";
|
|
7
8
|
import {
|
|
@@ -416,3 +417,14 @@ it("supports class member doc comments", () => {
|
|
|
416
417
|
}
|
|
417
418
|
`);
|
|
418
419
|
});
|
|
420
|
+
|
|
421
|
+
it("specify attributes", () => {
|
|
422
|
+
expect(
|
|
423
|
+
<utils.TestNamespace>
|
|
424
|
+
<ClassDeclaration name="Test" attributes={[<Attribute name="Test" />]} />
|
|
425
|
+
</utils.TestNamespace>,
|
|
426
|
+
).toRenderTo(`
|
|
427
|
+
[Test]
|
|
428
|
+
class Test;
|
|
429
|
+
`);
|
|
430
|
+
});
|