@alloy-js/csharp 0.20.0-dev.0 → 0.20.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.
- package/dist/src/components/Declaration.d.ts +2 -2
- package/dist/src/components/Declaration.d.ts.map +1 -1
- package/dist/src/components/Declaration.js +5 -14
- package/dist/src/components/Declaration.js.map +1 -0
- package/dist/src/components/Name.js +2 -1
- package/dist/src/components/Name.js.map +1 -0
- package/dist/src/components/ProjectDirectory.js +2 -1
- package/dist/src/components/ProjectDirectory.js.map +1 -0
- package/dist/src/components/Reference.d.ts.map +1 -1
- package/dist/src/components/Reference.js +7 -2
- package/dist/src/components/Reference.js.map +1 -0
- package/dist/src/components/UsingDirective.d.ts +5 -1
- package/dist/src/components/UsingDirective.d.ts.map +1 -1
- package/dist/src/components/UsingDirective.js +5 -2
- package/dist/src/components/UsingDirective.js.map +1 -0
- package/dist/src/components/access-expression/access-expression.d.ts +54 -0
- package/dist/src/components/access-expression/access-expression.d.ts.map +1 -0
- package/dist/src/components/access-expression/access-expression.js +277 -0
- package/dist/src/components/access-expression/access-expression.js.map +1 -0
- package/dist/src/components/access-expression/access-expression.test.d.ts +2 -0
- package/dist/src/components/access-expression/access-expression.test.d.ts.map +1 -0
- package/dist/src/components/access-expression/access-expression.test.js +336 -0
- package/dist/src/components/access-expression/access-expression.test.js.map +1 -0
- package/dist/src/components/access-expression/part-descriptors.d.ts +32 -0
- package/dist/src/components/access-expression/part-descriptors.d.ts.map +1 -0
- package/dist/src/components/access-expression/part-descriptors.js +99 -0
- package/dist/src/components/access-expression/part-descriptors.js.map +1 -0
- package/dist/src/components/attributes/attributes.js +2 -1
- package/dist/src/components/attributes/attributes.js.map +1 -0
- package/dist/src/components/attributes/attributes.test.js +2 -1
- package/dist/src/components/attributes/attributes.test.js.map +1 -0
- package/dist/src/components/{ClassDeclaration.d.ts → class/declaration.d.ts} +30 -12
- package/dist/src/components/class/declaration.d.ts.map +1 -0
- package/dist/src/components/class/declaration.js +87 -0
- package/dist/src/components/class/declaration.js.map +1 -0
- package/dist/src/components/class/declaration.test.d.ts +2 -0
- package/dist/src/components/class/declaration.test.d.ts.map +1 -0
- package/dist/src/components/class/declaration.test.js +573 -0
- package/dist/src/components/class/declaration.test.js.map +1 -0
- package/dist/src/components/constructor/constructor.d.ts.map +1 -1
- package/dist/src/components/constructor/constructor.js +13 -20
- package/dist/src/components/constructor/constructor.js.map +1 -0
- package/dist/src/components/constructor/constructor.test.js +13 -21
- package/dist/src/components/constructor/constructor.test.js.map +1 -0
- package/dist/src/components/doc/comment.js +2 -1
- package/dist/src/components/doc/comment.js.map +1 -0
- package/dist/src/components/doc/comment.test.js +2 -1
- package/dist/src/components/doc/comment.test.js.map +1 -0
- package/dist/src/components/doc/from-markdown.js +2 -1
- package/dist/src/components/doc/from-markdown.js.map +1 -0
- package/dist/src/components/doc/from-markdown.test.js +2 -1
- package/dist/src/components/doc/from-markdown.test.js.map +1 -0
- package/dist/src/components/{EnumDeclaration.d.ts → enum/declaration.d.ts} +6 -11
- package/dist/src/components/enum/declaration.d.ts.map +1 -0
- package/dist/src/components/enum/declaration.js +55 -0
- package/dist/src/components/enum/declaration.js.map +1 -0
- package/dist/src/components/enum/declaration.ref.test.d.ts +2 -0
- package/dist/src/components/enum/declaration.ref.test.d.ts.map +1 -0
- package/dist/src/components/enum/declaration.ref.test.js +121 -0
- package/dist/src/components/enum/declaration.ref.test.js.map +1 -0
- package/dist/src/components/enum/declaration.test.d.ts +2 -0
- package/dist/src/components/enum/declaration.test.d.ts.map +1 -0
- package/dist/src/components/enum/declaration.test.js +40 -0
- package/dist/src/components/enum/declaration.test.js.map +1 -0
- package/dist/src/components/enum/member.d.ts +7 -0
- package/dist/src/components/enum/member.d.ts.map +1 -0
- package/dist/src/components/enum/member.js +30 -0
- package/dist/src/components/enum/member.js.map +1 -0
- package/dist/src/components/enum/member.test.d.ts +2 -0
- package/dist/src/components/enum/member.test.d.ts.map +1 -0
- package/dist/src/components/enum/member.test.js +29 -0
- package/dist/src/components/enum/member.test.js.map +1 -0
- package/dist/src/components/field/field.d.ts.map +1 -1
- package/dist/src/components/field/field.js +11 -18
- package/dist/src/components/field/field.js.map +1 -0
- package/dist/src/components/field/field.test.js +10 -9
- package/dist/src/components/field/field.test.js.map +1 -0
- package/dist/src/components/index.d.ts +8 -4
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +10 -5
- package/dist/src/components/index.js.map +1 -0
- package/dist/src/components/interface/declaration.d.ts.map +1 -1
- package/dist/src/components/interface/declaration.js +21 -22
- package/dist/src/components/interface/declaration.js.map +1 -0
- package/dist/src/components/interface/declaration.test.js +28 -36
- package/dist/src/components/interface/declaration.test.js.map +1 -0
- package/dist/src/components/interface/method.d.ts.map +1 -1
- package/dist/src/components/interface/method.js +9 -19
- package/dist/src/components/interface/method.js.map +1 -0
- package/dist/src/components/interface/method.test.js +40 -48
- package/dist/src/components/interface/method.test.js.map +1 -0
- package/dist/src/components/interface/property.d.ts.map +1 -1
- package/dist/src/components/interface/property.js +23 -40
- package/dist/src/components/interface/property.js.map +1 -0
- package/dist/src/components/interface/property.test.js +13 -12
- package/dist/src/components/interface/property.test.js.map +1 -0
- package/dist/src/components/invocation-expression/invocation-expression.d.ts +29 -0
- package/dist/src/components/invocation-expression/invocation-expression.d.ts.map +1 -0
- package/dist/src/components/invocation-expression/invocation-expression.js +70 -0
- package/dist/src/components/invocation-expression/invocation-expression.js.map +1 -0
- package/dist/src/components/invocation-expression/invocation-expression.test.d.ts +2 -0
- package/dist/src/components/invocation-expression/invocation-expression.test.d.ts.map +1 -0
- package/dist/src/components/invocation-expression/invocation-expression.test.js +105 -0
- package/dist/src/components/invocation-expression/invocation-expression.test.js.map +1 -0
- package/dist/src/components/lexical-scope.d.ts +8 -0
- package/dist/src/components/lexical-scope.d.ts.map +1 -0
- package/dist/src/components/lexical-scope.js +25 -0
- package/dist/src/components/lexical-scope.js.map +1 -0
- package/dist/src/components/method/method.d.ts +5 -2
- package/dist/src/components/method/method.d.ts.map +1 -1
- package/dist/src/components/method/method.js +9 -17
- package/dist/src/components/method/method.js.map +1 -0
- package/dist/src/components/method/method.test.js +13 -12
- package/dist/src/components/method/method.test.js.map +1 -0
- package/dist/src/components/method-scope.d.ts +8 -0
- package/dist/src/components/method-scope.d.ts.map +1 -0
- package/dist/src/components/method-scope.js +25 -0
- package/dist/src/components/method-scope.js.map +1 -0
- package/dist/src/components/namespace-scopes.d.ts +13 -0
- package/dist/src/components/namespace-scopes.d.ts.map +1 -0
- package/dist/src/components/namespace-scopes.js +45 -0
- package/dist/src/components/namespace-scopes.js.map +1 -0
- package/dist/src/components/namespace.d.ts +7 -0
- package/dist/src/components/namespace.d.ts.map +1 -0
- package/dist/src/components/namespace.js +47 -0
- package/dist/src/components/namespace.js.map +1 -0
- package/dist/src/components/namespace.ref.test.d.ts +2 -0
- package/dist/src/components/namespace.ref.test.d.ts.map +1 -0
- package/dist/src/components/namespace.ref.test.js +182 -0
- package/dist/src/components/namespace.ref.test.js.map +1 -0
- package/dist/src/components/namespace.test.d.ts.map +1 -0
- package/dist/src/components/namespace.test.js +79 -0
- package/dist/src/components/namespace.test.js.map +1 -0
- package/dist/src/components/parameters/parameters.d.ts +2 -3
- package/dist/src/components/parameters/parameters.d.ts.map +1 -1
- package/dist/src/components/parameters/parameters.js +15 -15
- package/dist/src/components/parameters/parameters.js.map +1 -0
- package/dist/src/components/parameters/parameters.test.d.ts +2 -0
- package/dist/src/components/parameters/parameters.test.d.ts.map +1 -0
- package/dist/src/components/parameters/parameters.test.js +154 -0
- package/dist/src/components/parameters/parameters.test.js.map +1 -0
- package/dist/src/components/property/property.d.ts +2 -2
- package/dist/src/components/property/property.d.ts.map +1 -1
- package/dist/src/components/property/property.js +30 -40
- package/dist/src/components/property/property.js.map +1 -0
- package/dist/src/components/property/property.test.js +17 -16
- package/dist/src/components/property/property.test.js.map +1 -0
- package/dist/src/components/record/declaration.d.ts +18 -0
- package/dist/src/components/record/declaration.d.ts.map +1 -1
- package/dist/src/components/record/declaration.js +21 -14
- package/dist/src/components/record/declaration.js.map +1 -0
- package/dist/src/components/record/declaration.test.js +52 -4
- package/dist/src/components/record/declaration.test.js.map +1 -0
- package/dist/src/components/source-file/source-file.d.ts +19 -0
- package/dist/src/components/source-file/source-file.d.ts.map +1 -0
- package/dist/src/components/source-file/source-file.js +59 -0
- package/dist/src/components/source-file/source-file.js.map +1 -0
- package/dist/src/components/source-file/source-file.test.d.ts +2 -0
- package/dist/src/components/source-file/source-file.test.d.ts.map +1 -0
- package/dist/src/components/source-file/source-file.test.js +136 -0
- package/dist/src/components/source-file/source-file.test.js.map +1 -0
- package/dist/src/components/stc/index.js +2 -1
- package/dist/src/components/stc/index.js.map +1 -0
- package/dist/src/components/struct/declaration.d.ts.map +1 -1
- package/dist/src/components/struct/declaration.js +6 -7
- package/dist/src/components/struct/declaration.js.map +1 -0
- package/dist/src/components/struct/declaration.test.js +32 -40
- package/dist/src/components/struct/declaration.test.js.map +1 -0
- package/dist/src/components/type-parameters/type-parameter-constraints.js +2 -1
- package/dist/src/components/type-parameters/type-parameter-constraints.js.map +1 -0
- package/dist/src/components/type-parameters/type-parameter-constraints.test.js +2 -1
- package/dist/src/components/type-parameters/type-parameter-constraints.test.js.map +1 -0
- package/dist/src/components/type-parameters/type-parameter.d.ts.map +1 -1
- package/dist/src/components/type-parameters/type-parameter.js +9 -11
- package/dist/src/components/type-parameters/type-parameter.js.map +1 -0
- package/dist/src/components/type-parameters/type-parameters.js +2 -1
- package/dist/src/components/type-parameters/type-parameters.js.map +1 -0
- package/dist/src/components/type-parameters/type-parameters.test.js +5 -4
- package/dist/src/components/type-parameters/type-parameters.test.js.map +1 -0
- package/dist/src/components/var/declaration.d.ts.map +1 -1
- package/dist/src/components/var/declaration.js +8 -9
- package/dist/src/components/var/declaration.js.map +1 -0
- package/dist/src/components/var/declaration.test.js +13 -21
- package/dist/src/components/var/declaration.test.js.map +1 -0
- package/dist/src/contexts/format-options.d.ts +5 -0
- package/dist/src/contexts/format-options.d.ts.map +1 -0
- package/dist/src/contexts/format-options.js +9 -0
- package/dist/src/contexts/format-options.js.map +1 -0
- package/dist/src/contexts/global-namespace.d.ts +5 -0
- package/dist/src/contexts/global-namespace.d.ts.map +1 -0
- package/dist/src/contexts/global-namespace.js +25 -0
- package/dist/src/contexts/global-namespace.js.map +1 -0
- package/dist/src/contexts/namespace.d.ts +8 -0
- package/dist/src/contexts/namespace.d.ts.map +1 -0
- package/dist/src/contexts/namespace.js +6 -0
- package/dist/src/contexts/namespace.js.map +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +4 -1
- package/dist/src/index.js.map +1 -0
- package/dist/src/modifiers.d.ts +11 -0
- package/dist/src/modifiers.d.ts.map +1 -1
- package/dist/src/modifiers.js +2 -1
- package/dist/src/modifiers.js.map +1 -0
- package/dist/src/name-policy.js +2 -1
- package/dist/src/name-policy.js.map +1 -0
- package/dist/src/scopes/class.d.ts +10 -0
- package/dist/src/scopes/class.d.ts.map +1 -0
- package/dist/src/scopes/class.js +11 -0
- package/dist/src/scopes/class.js.map +1 -0
- package/dist/src/scopes/contexts.d.ts +9 -0
- package/dist/src/scopes/contexts.d.ts.map +1 -0
- package/dist/src/scopes/contexts.js +34 -0
- package/dist/src/scopes/contexts.js.map +1 -0
- package/dist/src/scopes/csharp.d.ts +10 -0
- package/dist/src/scopes/csharp.d.ts.map +1 -0
- package/dist/src/scopes/csharp.js +15 -0
- package/dist/src/scopes/csharp.js.map +1 -0
- package/dist/src/scopes/factories.d.ts +9 -0
- package/dist/src/scopes/factories.d.ts.map +1 -0
- package/dist/src/scopes/factories.js +24 -0
- package/dist/src/scopes/factories.js.map +1 -0
- package/dist/src/scopes/index.d.ts +10 -0
- package/dist/src/scopes/index.d.ts.map +1 -0
- package/dist/src/scopes/index.js +10 -0
- package/dist/src/scopes/index.js.map +1 -0
- package/dist/src/scopes/lexical.d.ts +7 -0
- package/dist/src/scopes/lexical.d.ts.map +1 -0
- package/dist/src/scopes/lexical.js +8 -0
- package/dist/src/scopes/lexical.js.map +1 -0
- package/dist/src/scopes/method.d.ts +9 -0
- package/dist/src/scopes/method.d.ts.map +1 -0
- package/dist/src/scopes/method.js +14 -0
- package/dist/src/scopes/method.js.map +1 -0
- package/dist/src/scopes/named-type.d.ts +22 -0
- package/dist/src/scopes/named-type.d.ts.map +1 -0
- package/dist/src/scopes/named-type.js +33 -0
- package/dist/src/scopes/named-type.js.map +1 -0
- package/dist/src/scopes/namespace.d.ts +11 -0
- package/dist/src/scopes/namespace.d.ts.map +1 -0
- package/dist/src/scopes/namespace.js +39 -0
- package/dist/src/scopes/namespace.js.map +1 -0
- package/dist/src/scopes/source-file.d.ts +16 -0
- package/dist/src/scopes/source-file.d.ts.map +1 -0
- package/dist/src/scopes/source-file.js +44 -0
- package/dist/src/scopes/source-file.js.map +1 -0
- package/dist/src/symbols/csharp.d.ts +87 -0
- package/dist/src/symbols/csharp.d.ts.map +1 -0
- package/dist/src/symbols/csharp.js +246 -0
- package/dist/src/symbols/csharp.js.map +1 -0
- package/dist/src/symbols/factories.d.ts +25 -0
- package/dist/src/symbols/factories.d.ts.map +1 -0
- package/dist/src/symbols/factories.js +93 -0
- package/dist/src/symbols/factories.js.map +1 -0
- package/dist/src/symbols/index.d.ts +5 -2
- package/dist/src/symbols/index.d.ts.map +1 -1
- package/dist/src/symbols/index.js +6 -2
- package/dist/src/symbols/index.js.map +1 -0
- package/dist/src/symbols/method.d.ts +13 -0
- package/dist/src/symbols/method.d.ts.map +1 -0
- package/dist/src/symbols/method.js +16 -0
- package/dist/src/symbols/method.js.map +1 -0
- package/dist/src/symbols/named-type.d.ts +19 -0
- package/dist/src/symbols/named-type.d.ts.map +1 -0
- package/dist/src/symbols/named-type.js +31 -0
- package/dist/src/symbols/named-type.js.map +1 -0
- package/dist/src/symbols/namespace.d.ts +22 -0
- package/dist/src/symbols/namespace.d.ts.map +1 -0
- package/dist/src/symbols/namespace.js +45 -0
- package/dist/src/symbols/namespace.js.map +1 -0
- package/dist/src/symbols/reference.d.ts +2 -2
- package/dist/src/symbols/reference.d.ts.map +1 -1
- package/dist/src/symbols/reference.js +50 -44
- package/dist/src/symbols/reference.js.map +1 -0
- package/dist/test/project-directory.test.js +20 -19
- package/dist/test/project-directory.test.js.map +1 -0
- package/dist/test/using.test.js +23 -21
- package/dist/test/using.test.js.map +1 -0
- package/dist/test/utils.d.ts.map +1 -1
- package/dist/test/utils.js +7 -4
- package/dist/test/utils.js.map +1 -0
- package/dist/test/vitest.setup.js +2 -1
- package/dist/test/vitest.setup.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -6
- package/src/components/Declaration.tsx +3 -6
- package/src/components/Reference.tsx +3 -1
- package/src/components/UsingDirective.tsx +12 -2
- package/src/components/access-expression/access-expression.test.tsx +284 -0
- package/src/components/access-expression/access-expression.tsx +375 -0
- package/src/components/access-expression/part-descriptors.ts +175 -0
- package/src/components/class/declaration.test.tsx +484 -0
- package/src/components/{ClassDeclaration.tsx → class/declaration.tsx} +63 -44
- package/src/components/constructor/constructor.test.tsx +11 -17
- package/src/components/constructor/constructor.tsx +13 -32
- package/src/components/enum/declaration.ref.test.tsx +93 -0
- package/src/components/enum/declaration.test.tsx +34 -0
- package/src/components/enum/declaration.tsx +65 -0
- package/src/components/enum/member.test.tsx +24 -0
- package/src/components/enum/member.tsx +36 -0
- package/src/components/field/field.test.tsx +8 -8
- package/src/components/field/field.tsx +12 -22
- package/src/components/index.ts +8 -4
- package/src/components/interface/declaration.test.tsx +26 -32
- package/src/components/interface/declaration.tsx +16 -18
- package/src/components/interface/method.test.tsx +38 -44
- package/src/components/interface/method.tsx +7 -20
- package/src/components/interface/property.test.tsx +11 -11
- package/src/components/interface/property.tsx +15 -34
- package/src/components/invocation-expression/invocation-expression.test.tsx +101 -0
- package/src/components/invocation-expression/invocation-expression.tsx +60 -0
- package/src/components/lexical-scope.tsx +29 -0
- package/src/components/method/method.test.tsx +11 -11
- package/src/components/method/method.tsx +12 -23
- package/src/components/method-scope.tsx +27 -0
- package/src/components/namespace-scopes.tsx +44 -0
- package/src/components/namespace.ref.test.tsx +139 -0
- package/src/components/namespace.test.tsx +52 -0
- package/src/components/namespace.tsx +45 -0
- package/src/components/parameters/parameters.test.tsx +117 -0
- package/src/components/parameters/parameters.tsx +11 -21
- package/src/components/property/property.test.tsx +15 -15
- package/src/components/property/property.tsx +23 -41
- package/src/components/record/declaration.test.tsx +47 -3
- package/src/components/record/declaration.tsx +34 -11
- package/src/components/source-file/source-file.test.tsx +96 -0
- package/src/components/source-file/source-file.tsx +98 -0
- package/src/components/struct/declaration.test.tsx +16 -22
- package/src/components/struct/declaration.tsx +4 -6
- package/src/components/type-parameters/type-parameter.tsx +14 -11
- package/src/components/type-parameters/type-parameters.test.tsx +4 -4
- package/src/components/var/declaration.test.tsx +8 -14
- package/src/components/var/declaration.tsx +12 -6
- package/src/contexts/format-options.ts +14 -0
- package/src/contexts/global-namespace.ts +29 -0
- package/src/contexts/namespace.ts +13 -0
- package/src/index.ts +2 -0
- package/src/modifiers.ts +14 -0
- package/src/scopes/class.ts +12 -0
- package/src/scopes/contexts.ts +45 -0
- package/src/scopes/csharp.ts +23 -0
- package/src/scopes/factories.ts +45 -0
- package/src/scopes/index.ts +9 -0
- package/src/scopes/lexical.ts +10 -0
- package/src/scopes/method.ts +22 -0
- package/src/scopes/named-type.ts +44 -0
- package/src/scopes/namespace.ts +59 -0
- package/src/scopes/source-file.ts +67 -0
- package/src/symbols/csharp.ts +339 -0
- package/src/symbols/factories.ts +215 -0
- package/src/symbols/index.ts +5 -2
- package/src/symbols/method.ts +26 -0
- package/src/symbols/named-type.ts +54 -0
- package/src/symbols/namespace.ts +62 -0
- package/src/symbols/reference.tsx +64 -0
- package/temp/api.json +6910 -2491
- package/test/project-directory.test.tsx +14 -16
- package/test/using.test.tsx +21 -21
- package/test/utils.tsx +2 -1
- package/tsconfig.json +4 -1
- package/tsdoc-metadata.json +1 -1
- package/dist/src/components/ClassDeclaration.d.ts.map +0 -1
- package/dist/src/components/ClassDeclaration.js +0 -92
- package/dist/src/components/EnumDeclaration.d.ts.map +0 -1
- package/dist/src/components/EnumDeclaration.js +0 -85
- package/dist/src/components/Namespace.d.ts +0 -11
- package/dist/src/components/Namespace.d.ts.map +0 -1
- package/dist/src/components/Namespace.js +0 -33
- package/dist/src/components/SourceFile.d.ts +0 -14
- package/dist/src/components/SourceFile.d.ts.map +0 -1
- package/dist/src/components/SourceFile.js +0 -69
- package/dist/src/symbols/csharp-output-symbol.d.ts +0 -8
- package/dist/src/symbols/csharp-output-symbol.d.ts.map +0 -1
- package/dist/src/symbols/csharp-output-symbol.js +0 -19
- package/dist/src/symbols/scopes.d.ts +0 -14
- package/dist/src/symbols/scopes.d.ts.map +0 -1
- package/dist/src/symbols/scopes.js +0 -31
- package/dist/test/class-declaration.test.d.ts +0 -2
- package/dist/test/class-declaration.test.d.ts.map +0 -1
- package/dist/test/class-declaration.test.js +0 -484
- package/dist/test/enum.test.d.ts +0 -2
- package/dist/test/enum.test.d.ts.map +0 -1
- package/dist/test/enum.test.js +0 -178
- package/dist/test/namespace.test.d.ts.map +0 -1
- package/dist/test/namespace.test.js +0 -81
- package/dist/test/sourcefile.test.d.ts +0 -2
- package/dist/test/sourcefile.test.d.ts.map +0 -1
- package/dist/test/sourcefile.test.js +0 -58
- package/src/components/EnumDeclaration.tsx +0 -99
- package/src/components/Namespace.tsx +0 -35
- package/src/components/SourceFile.tsx +0 -78
- package/src/symbols/csharp-output-symbol.ts +0 -22
- package/src/symbols/reference.ts +0 -65
- package/src/symbols/scopes.ts +0 -41
- package/test/class-declaration.test.tsx +0 -413
- package/test/enum.test.tsx +0 -149
- package/test/namespace.test.tsx +0 -55
- package/test/sourcefile.test.tsx +0 -47
- /package/dist/{test → src/components}/namespace.test.d.ts +0 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { memo as _$memo, createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
|
+
import { Block, Declaration, join, Name, Scope } from "@alloy-js/core";
|
|
3
|
+
import { computeModifiersPrefix, getAccessModifier, makeModifiers } from "../../modifiers.js";
|
|
4
|
+
import { createClassScope } from "../../scopes/factories.js";
|
|
5
|
+
import { createNamedTypeSymbol } from "../../symbols/factories.js";
|
|
6
|
+
import { AttributeList } from "../attributes/attributes.js";
|
|
7
|
+
import { DocWhen } from "../doc/comment.js";
|
|
8
|
+
import { Parameters } from "../parameters/parameters.js";
|
|
9
|
+
import { TypeParameterConstraints } from "../type-parameters/type-parameter-constraints.js";
|
|
10
|
+
import { TypeParameters } from "../type-parameters/type-parameters.js";
|
|
11
|
+
const getClassModifiers = makeModifiers(["abstract", "sealed", "static", "partial"]);
|
|
12
|
+
|
|
13
|
+
// properties for creating a class
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* CSharp class declaration.
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <ClassDeclaration public name="MyClass">
|
|
20
|
+
* <ClassMember public name="MyField" type="int" />
|
|
21
|
+
* <ClassConstructor>
|
|
22
|
+
* <Parameter name="value" type="int" />
|
|
23
|
+
* this.MyField = value;
|
|
24
|
+
* </ClassConstructor>
|
|
25
|
+
* </ClassDeclaration>
|
|
26
|
+
* ```
|
|
27
|
+
* This will produce:
|
|
28
|
+
* ```csharp
|
|
29
|
+
* public class MyClass
|
|
30
|
+
* {
|
|
31
|
+
* public int MyField;
|
|
32
|
+
* public MyClass(int value)
|
|
33
|
+
* {
|
|
34
|
+
* this.MyField = value;
|
|
35
|
+
* }
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export function ClassDeclaration(props) {
|
|
40
|
+
const thisClassSymbol = createNamedTypeSymbol(props.name, "class", {
|
|
41
|
+
refkeys: props.refkey
|
|
42
|
+
});
|
|
43
|
+
const thisClassScope = createClassScope(thisClassSymbol);
|
|
44
|
+
const bases = [...(props.baseType ? [props.baseType] : []), ...(props.interfaceTypes || [])];
|
|
45
|
+
const base = bases.length > 0 ? [" : ", _$memo(() => join(bases, {
|
|
46
|
+
joiner: ", "
|
|
47
|
+
}))] : null;
|
|
48
|
+
const modifiers = computeModifiersPrefix([getAccessModifier(props), getClassModifiers(props)]);
|
|
49
|
+
return _$createComponent(Declaration, {
|
|
50
|
+
symbol: thisClassSymbol,
|
|
51
|
+
get children() {
|
|
52
|
+
return [_$createComponent(DocWhen, {
|
|
53
|
+
get doc() {
|
|
54
|
+
return props.doc;
|
|
55
|
+
}
|
|
56
|
+
}), _$createComponent(AttributeList, {
|
|
57
|
+
get attributes() {
|
|
58
|
+
return props.attributes;
|
|
59
|
+
},
|
|
60
|
+
endline: true
|
|
61
|
+
}), modifiers, "class ", _$createComponent(Name, {}), _$createComponent(Scope, {
|
|
62
|
+
value: thisClassScope,
|
|
63
|
+
get children() {
|
|
64
|
+
return [_$memo(() => _$memo(() => !!props.typeParameters)() && _$createComponent(TypeParameters, {
|
|
65
|
+
get parameters() {
|
|
66
|
+
return props.typeParameters;
|
|
67
|
+
}
|
|
68
|
+
})), _$memo(() => _$memo(() => !!props.primaryConstructor)() && _$createComponent(Parameters, {
|
|
69
|
+
get parameters() {
|
|
70
|
+
return props.primaryConstructor;
|
|
71
|
+
}
|
|
72
|
+
})), base, _$memo(() => _$memo(() => !!props.typeParameters)() && _$createComponent(TypeParameterConstraints, {
|
|
73
|
+
get parameters() {
|
|
74
|
+
return props.typeParameters;
|
|
75
|
+
}
|
|
76
|
+
})), _$memo(() => !props.children && ";"), _$memo(() => _$memo(() => !!props.children)() && _$createComponent(Block, {
|
|
77
|
+
newline: true,
|
|
78
|
+
get children() {
|
|
79
|
+
return props.children;
|
|
80
|
+
}
|
|
81
|
+
}))];
|
|
82
|
+
}
|
|
83
|
+
})];
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=declaration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Block","Declaration","join","Name","Scope","computeModifiersPrefix","getAccessModifier","makeModifiers","createClassScope","createNamedTypeSymbol","AttributeList","DocWhen","Parameters","TypeParameterConstraints","TypeParameters","getClassModifiers","ClassDeclaration","props","thisClassSymbol","name","refkeys","refkey","thisClassScope","bases","baseType","interfaceTypes","base","length","_$memo","joiner","modifiers","_$createComponent","symbol","children","doc","attributes","endline","value","typeParameters","parameters","primaryConstructor","newline"],"sources":["../../../../src/components/class/declaration.tsx"],"sourcesContent":[null],"mappings":";AAAA,SACEA,KAAK,EAELC,WAAW,EAEXC,IAAI,EACJC,IAAI,EAGJC,KAAK,QACA,gBAAgB;AACvB,SAEEC,sBAAsB,EACtBC,iBAAiB,EACjBC,aAAa,QACR,oBAAoB;AAC3B,SAASC,gBAAgB,QAAQ,2BAA2B;AAC5D,SAASC,qBAAqB,QAAQ,4BAA4B;AAClE,SAASC,aAAa;AACtB,SAASC,OAAO;AAChB,SAAyBC,UAAU;AACnC,SAASC,wBAAwB;AAEjC,SAASC,cAAc;AASvB,MAAMC,iBAAiB,GAAGR,aAAa,CAAiB,CACtD,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,SAAS,CACV,CAAC;;AAEF;;AAmEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASS,gBAAgBA,CAACC,KAA4B,EAAE;EAC7D,MAAMC,eAAe,GAAGT,qBAAqB,CAACQ,KAAK,CAACE,IAAI,EAAE,OAAO,EAAE;IACjEC,OAAO,EAAEH,KAAK,CAACI;EACjB,CAAC,CAAC;EAEF,MAAMC,cAAc,GAAGd,gBAAgB,CAACU,eAAe,CAAC;EAExD,MAAMK,KAAK,GAAG,CACZ,IAAIN,KAAK,CAACO,QAAQ,GAAG,CAACP,KAAK,CAACO,QA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AAA,OAAEtB,KAAK,CAACqB,cAAc;YAAA;UAAA,EAC3D,GAAAV,MAAA,OACA,CAACX,KAAK,CAACgB,QAAQ,IAAI,GAAG,GAAAL,MAAA,OACtBA,MAAA,SAAAX,KAAK,CAACgB,QAAQ,OAAAF,iBAAA,CAAK/B,KAAK;YAACyC,OAAO;YAAA,IAAAR,SAAA;cAAA,OAAEhB,KAAK,CAACgB,QAAQ;YAAA;UAAA,EAAS;QAAA;MAAA;IAAA;EAAA;AAIlE","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declaration.test.d.ts","sourceRoot":"","sources":["../../../../src/components/class/declaration.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,573 @@
|
|
|
1
|
+
import { createComponent as _$createComponent, mergeProps as _$mergeProps, createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
|
|
2
|
+
import { Constructor } from "#components/constructor/constructor.js";
|
|
3
|
+
import { EnumDeclaration } from "#components/enum/declaration.js";
|
|
4
|
+
import { EnumMember } from "#components/enum/member.js";
|
|
5
|
+
import { code, createNamePolicy, List, NamePolicyContext, Output, refkey } from "@alloy-js/core";
|
|
6
|
+
import * as coretest from "@alloy-js/core/testing";
|
|
7
|
+
import { describe, expect, it } from "vitest";
|
|
8
|
+
import { TestNamespace, toSourceText } from "../../../test/utils.js";
|
|
9
|
+
import { createCSharpNamePolicy } from "../../name-policy.js";
|
|
10
|
+
import { Attribute } from "../attributes/attributes.js";
|
|
11
|
+
import { Field } from "../field/field.js";
|
|
12
|
+
import { Method } from "../method/method.js";
|
|
13
|
+
import { Property } from "../property/property.js";
|
|
14
|
+
import { SourceFile } from "../source-file/source-file.js";
|
|
15
|
+
import { ClassDeclaration } from "./declaration.js";
|
|
16
|
+
function Wrapper({
|
|
17
|
+
children
|
|
18
|
+
}) {
|
|
19
|
+
return _$createComponent(TestNamespace, {
|
|
20
|
+
children: children
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
it("declares class with no members", () => {
|
|
24
|
+
expect(_$createComponent(TestNamespace, {
|
|
25
|
+
get children() {
|
|
26
|
+
return _$createComponent(ClassDeclaration, {
|
|
27
|
+
name: "TestClass"
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
})).toRenderTo(`
|
|
31
|
+
class TestClass;
|
|
32
|
+
`);
|
|
33
|
+
});
|
|
34
|
+
describe("modifiers", () => {
|
|
35
|
+
it.each(["public", "private"])("%s", mod => {
|
|
36
|
+
expect(_$createComponent(TestNamespace, {
|
|
37
|
+
get children() {
|
|
38
|
+
return _$createComponent(ClassDeclaration, _$mergeProps({
|
|
39
|
+
[mod]: true
|
|
40
|
+
}, {
|
|
41
|
+
name: "TestClass"
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
44
|
+
})).toRenderTo(`
|
|
45
|
+
${mod} class TestClass;
|
|
46
|
+
`);
|
|
47
|
+
});
|
|
48
|
+
it.each(["partial", "abstract", "static", "sealed"])("%s", mod => {
|
|
49
|
+
expect(_$createComponent(TestNamespace, {
|
|
50
|
+
get children() {
|
|
51
|
+
return _$createComponent(ClassDeclaration, _$mergeProps({
|
|
52
|
+
[mod]: true
|
|
53
|
+
}, {
|
|
54
|
+
name: "TestClass"
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
57
|
+
})).toRenderTo(`
|
|
58
|
+
${mod} class TestClass;
|
|
59
|
+
`);
|
|
60
|
+
});
|
|
61
|
+
it("combines modifiers", () => {
|
|
62
|
+
expect(_$createComponent(TestNamespace, {
|
|
63
|
+
get children() {
|
|
64
|
+
return _$createComponent(ClassDeclaration, {
|
|
65
|
+
"public": true,
|
|
66
|
+
abstract: true,
|
|
67
|
+
partial: true,
|
|
68
|
+
name: "TestClass"
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
})).toRenderTo(`
|
|
72
|
+
public abstract partial class TestClass;
|
|
73
|
+
`);
|
|
74
|
+
});
|
|
75
|
+
it("places visibility, attributes, and modifiers in the correct order", () => {
|
|
76
|
+
expect(_$createComponent(TestNamespace, {
|
|
77
|
+
get children() {
|
|
78
|
+
return _$createComponent(ClassDeclaration, {
|
|
79
|
+
partial: true,
|
|
80
|
+
"public": true,
|
|
81
|
+
abstract: true,
|
|
82
|
+
sealed: true,
|
|
83
|
+
name: "TestClass",
|
|
84
|
+
get attributes() {
|
|
85
|
+
return [_$createComponent(Attribute, {
|
|
86
|
+
name: "Test"
|
|
87
|
+
})];
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
})).toRenderTo(`
|
|
92
|
+
[Test]
|
|
93
|
+
public abstract sealed partial class TestClass;
|
|
94
|
+
`);
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
describe("base", () => {
|
|
98
|
+
it("define base class", () => {
|
|
99
|
+
expect(_$createComponent(TestNamespace, {
|
|
100
|
+
get children() {
|
|
101
|
+
return _$createComponent(ClassDeclaration, {
|
|
102
|
+
name: "TestClass",
|
|
103
|
+
baseType: "Foo"
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
})).toRenderTo(`
|
|
107
|
+
class TestClass : Foo;
|
|
108
|
+
`);
|
|
109
|
+
});
|
|
110
|
+
it("define multiple interface types", () => {
|
|
111
|
+
expect(_$createComponent(TestNamespace, {
|
|
112
|
+
get children() {
|
|
113
|
+
return _$createComponent(ClassDeclaration, {
|
|
114
|
+
name: "TestClass",
|
|
115
|
+
interfaceTypes: ["Foo", "Bar"]
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
})).toRenderTo(`
|
|
119
|
+
class TestClass : Foo, Bar;
|
|
120
|
+
`);
|
|
121
|
+
});
|
|
122
|
+
it("define base class and multiple interface types", () => {
|
|
123
|
+
expect(_$createComponent(TestNamespace, {
|
|
124
|
+
get children() {
|
|
125
|
+
return _$createComponent(ClassDeclaration, {
|
|
126
|
+
name: "TestClass",
|
|
127
|
+
baseType: "BaseClass",
|
|
128
|
+
interfaceTypes: ["Foo", "Bar"]
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
})).toRenderTo(`
|
|
132
|
+
class TestClass : BaseClass, Foo, Bar;
|
|
133
|
+
`);
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
it("declares class with some members", () => {
|
|
137
|
+
const tree = _$createComponent(TestNamespace, {
|
|
138
|
+
get children() {
|
|
139
|
+
return _$createComponent(ClassDeclaration, {
|
|
140
|
+
"public": true,
|
|
141
|
+
name: "TestClass",
|
|
142
|
+
get children() {
|
|
143
|
+
return _$createComponent(List, {
|
|
144
|
+
get children() {
|
|
145
|
+
return [_$createComponent(Field, {
|
|
146
|
+
"public": true,
|
|
147
|
+
name: "MemberOne",
|
|
148
|
+
type: "string"
|
|
149
|
+
}), _$createComponent(Field, {
|
|
150
|
+
"public": true,
|
|
151
|
+
name: "MemberTwo",
|
|
152
|
+
type: "int"
|
|
153
|
+
})];
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
expect(tree).toRenderTo(coretest.d`
|
|
161
|
+
public class TestClass
|
|
162
|
+
{
|
|
163
|
+
public string MemberOne;
|
|
164
|
+
public int MemberTwo;
|
|
165
|
+
}
|
|
166
|
+
`);
|
|
167
|
+
});
|
|
168
|
+
it("declares class with some methods", () => {
|
|
169
|
+
const tree = _$createComponent(TestNamespace, {
|
|
170
|
+
get children() {
|
|
171
|
+
return _$createComponent(ClassDeclaration, {
|
|
172
|
+
"public": true,
|
|
173
|
+
name: "TestClass",
|
|
174
|
+
get children() {
|
|
175
|
+
return _$createComponent(List, {
|
|
176
|
+
get children() {
|
|
177
|
+
return [_$createComponent(Method, {
|
|
178
|
+
"public": true,
|
|
179
|
+
name: "MethodOne"
|
|
180
|
+
}), _$createComponent(Method, {
|
|
181
|
+
"private": true,
|
|
182
|
+
virtual: true,
|
|
183
|
+
name: "MethodTwo"
|
|
184
|
+
})];
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
expect(tree).toRenderTo(coretest.d`
|
|
192
|
+
public class TestClass
|
|
193
|
+
{
|
|
194
|
+
public void MethodOne() {}
|
|
195
|
+
private virtual void MethodTwo() {}
|
|
196
|
+
}
|
|
197
|
+
`);
|
|
198
|
+
});
|
|
199
|
+
it("uses refkeys for members, params, and return type", () => {
|
|
200
|
+
const inputTypeRefkey = refkey();
|
|
201
|
+
const testResultTypeRefkey = refkey();
|
|
202
|
+
const enumTypeRefkey = refkey();
|
|
203
|
+
const params = [{
|
|
204
|
+
name: "IntParam",
|
|
205
|
+
type: "int"
|
|
206
|
+
}, {
|
|
207
|
+
name: "BodyParam",
|
|
208
|
+
type: inputTypeRefkey
|
|
209
|
+
}];
|
|
210
|
+
expect(_$createComponent(Output, {
|
|
211
|
+
get namePolicy() {
|
|
212
|
+
return createCSharpNamePolicy();
|
|
213
|
+
},
|
|
214
|
+
get children() {
|
|
215
|
+
return _$createComponent(SourceFile, {
|
|
216
|
+
path: "Test.cs",
|
|
217
|
+
get children() {
|
|
218
|
+
return [_$createComponent(EnumDeclaration, {
|
|
219
|
+
"public": true,
|
|
220
|
+
name: "TestEnum",
|
|
221
|
+
refkey: enumTypeRefkey,
|
|
222
|
+
get children() {
|
|
223
|
+
return _$createComponent(List, {
|
|
224
|
+
comma: true,
|
|
225
|
+
hardline: true,
|
|
226
|
+
get children() {
|
|
227
|
+
return [_$createComponent(EnumMember, {
|
|
228
|
+
name: "One"
|
|
229
|
+
}), _$createComponent(EnumMember, {
|
|
230
|
+
name: "Two"
|
|
231
|
+
})];
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
}), _$createIntrinsic("hbr", {}), _$createComponent(ClassDeclaration, {
|
|
236
|
+
"public": true,
|
|
237
|
+
name: "TestInput",
|
|
238
|
+
refkey: inputTypeRefkey
|
|
239
|
+
}), _$createIntrinsic("hbr", {}), _$createComponent(ClassDeclaration, {
|
|
240
|
+
"public": true,
|
|
241
|
+
name: "TestResult",
|
|
242
|
+
refkey: testResultTypeRefkey
|
|
243
|
+
}), _$createIntrinsic("hbr", {}), _$createComponent(ClassDeclaration, {
|
|
244
|
+
"public": true,
|
|
245
|
+
name: "TestClass",
|
|
246
|
+
get children() {
|
|
247
|
+
return [_$createComponent(Field, {
|
|
248
|
+
"private": true,
|
|
249
|
+
name: "MemberOne",
|
|
250
|
+
type: enumTypeRefkey
|
|
251
|
+
}), _$createIntrinsic("hbr", {}), _$createComponent(Method, {
|
|
252
|
+
"public": true,
|
|
253
|
+
name: "MethodOne",
|
|
254
|
+
parameters: params,
|
|
255
|
+
returns: testResultTypeRefkey,
|
|
256
|
+
get children() {
|
|
257
|
+
return ["return new ", testResultTypeRefkey, "();"];
|
|
258
|
+
}
|
|
259
|
+
})];
|
|
260
|
+
}
|
|
261
|
+
})];
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
})).toRenderTo(`
|
|
266
|
+
public enum TestEnum
|
|
267
|
+
{
|
|
268
|
+
One,
|
|
269
|
+
Two
|
|
270
|
+
}
|
|
271
|
+
public class TestInput;
|
|
272
|
+
public class TestResult;
|
|
273
|
+
public class TestClass
|
|
274
|
+
{
|
|
275
|
+
private TestEnum _memberOne;
|
|
276
|
+
public TestResult MethodOne(int intParam, TestInput bodyParam)
|
|
277
|
+
{
|
|
278
|
+
return new TestResult();
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
`);
|
|
282
|
+
});
|
|
283
|
+
describe("with type parameters", () => {
|
|
284
|
+
it("reference parameters", () => {
|
|
285
|
+
const typeParameters = [{
|
|
286
|
+
name: "T",
|
|
287
|
+
refkey: refkey()
|
|
288
|
+
}, {
|
|
289
|
+
name: "U",
|
|
290
|
+
refkey: refkey()
|
|
291
|
+
}];
|
|
292
|
+
expect(_$createComponent(TestNamespace, {
|
|
293
|
+
get children() {
|
|
294
|
+
return _$createComponent(ClassDeclaration, {
|
|
295
|
+
"public": true,
|
|
296
|
+
name: "TestClass",
|
|
297
|
+
typeParameters: typeParameters,
|
|
298
|
+
get children() {
|
|
299
|
+
return _$createComponent(List, {
|
|
300
|
+
get children() {
|
|
301
|
+
return [_$createComponent(Property, {
|
|
302
|
+
name: "PropA",
|
|
303
|
+
get type() {
|
|
304
|
+
return typeParameters[0].refkey;
|
|
305
|
+
},
|
|
306
|
+
get: true,
|
|
307
|
+
set: true
|
|
308
|
+
}), _$createComponent(Property, {
|
|
309
|
+
name: "PropB",
|
|
310
|
+
get type() {
|
|
311
|
+
return typeParameters[1].refkey;
|
|
312
|
+
},
|
|
313
|
+
get: true,
|
|
314
|
+
set: true
|
|
315
|
+
})];
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
})).toRenderTo(`
|
|
322
|
+
public class TestClass<T, U>
|
|
323
|
+
{
|
|
324
|
+
T PropA { get; set; }
|
|
325
|
+
U PropB { get; set; }
|
|
326
|
+
}
|
|
327
|
+
`);
|
|
328
|
+
});
|
|
329
|
+
it("defines with constraints", () => {
|
|
330
|
+
const typeParameters = [{
|
|
331
|
+
name: "T",
|
|
332
|
+
constraints: "IFoo"
|
|
333
|
+
}, {
|
|
334
|
+
name: "U",
|
|
335
|
+
constraints: "IBar"
|
|
336
|
+
}];
|
|
337
|
+
expect(_$createComponent(TestNamespace, {
|
|
338
|
+
get children() {
|
|
339
|
+
return _$createComponent(ClassDeclaration, {
|
|
340
|
+
"public": true,
|
|
341
|
+
name: "TestClass",
|
|
342
|
+
typeParameters: typeParameters,
|
|
343
|
+
children: "// Body"
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
})).toRenderTo(`
|
|
347
|
+
public class TestClass<T, U>
|
|
348
|
+
where T : IFoo
|
|
349
|
+
where U : IBar
|
|
350
|
+
{
|
|
351
|
+
// Body
|
|
352
|
+
}
|
|
353
|
+
`);
|
|
354
|
+
});
|
|
355
|
+
});
|
|
356
|
+
it("declares class with invalid members", () => {
|
|
357
|
+
const decl = _$createComponent(ClassDeclaration, {
|
|
358
|
+
"public": true,
|
|
359
|
+
name: "TestClass",
|
|
360
|
+
get children() {
|
|
361
|
+
return [_$createComponent(EnumMember, {
|
|
362
|
+
name: "One"
|
|
363
|
+
}), ",", _$createIntrinsic("hbr", {}), _$createComponent(EnumMember, {
|
|
364
|
+
name: "Two"
|
|
365
|
+
})];
|
|
366
|
+
}
|
|
367
|
+
});
|
|
368
|
+
expect(() => toSourceText(decl)).toThrow("EnumMember must be used within an EnumDeclaration.");
|
|
369
|
+
});
|
|
370
|
+
describe("constructor", () => {
|
|
371
|
+
it("declares with constructor", () => {
|
|
372
|
+
const tree = _$createComponent(TestNamespace, {
|
|
373
|
+
get children() {
|
|
374
|
+
return _$createComponent(ClassDeclaration, {
|
|
375
|
+
"public": true,
|
|
376
|
+
name: "TestClass",
|
|
377
|
+
get children() {
|
|
378
|
+
return _$createComponent(Constructor, {
|
|
379
|
+
"public": true
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
});
|
|
385
|
+
expect(tree).toRenderTo(coretest.d`
|
|
386
|
+
public class TestClass
|
|
387
|
+
{
|
|
388
|
+
public TestClass() {}
|
|
389
|
+
}
|
|
390
|
+
`);
|
|
391
|
+
});
|
|
392
|
+
it("declares with constructor params and assigns values to fields", () => {
|
|
393
|
+
const thisNameRefkey = refkey();
|
|
394
|
+
const thisSizeRefkey = refkey();
|
|
395
|
+
const paramNameRefkey = refkey();
|
|
396
|
+
const paramSizeRefkey = refkey();
|
|
397
|
+
const ctorParams = [{
|
|
398
|
+
name: "name",
|
|
399
|
+
type: "string",
|
|
400
|
+
refkey: paramNameRefkey
|
|
401
|
+
}, {
|
|
402
|
+
name: "size",
|
|
403
|
+
type: "int",
|
|
404
|
+
refkey: paramSizeRefkey
|
|
405
|
+
}];
|
|
406
|
+
const tree = _$createComponent(TestNamespace, {
|
|
407
|
+
get children() {
|
|
408
|
+
return _$createComponent(ClassDeclaration, {
|
|
409
|
+
"public": true,
|
|
410
|
+
name: "TestClass",
|
|
411
|
+
get children() {
|
|
412
|
+
return [_$createComponent(Field, {
|
|
413
|
+
"private": true,
|
|
414
|
+
name: "name",
|
|
415
|
+
type: "string",
|
|
416
|
+
refkey: thisNameRefkey
|
|
417
|
+
}), _$createIntrinsic("hbr", {}), _$createComponent(Field, {
|
|
418
|
+
"private": true,
|
|
419
|
+
name: "size",
|
|
420
|
+
type: "int",
|
|
421
|
+
refkey: thisSizeRefkey
|
|
422
|
+
}), _$createIntrinsic("hbr", {}), _$createComponent(Constructor, {
|
|
423
|
+
"public": true,
|
|
424
|
+
parameters: ctorParams,
|
|
425
|
+
get children() {
|
|
426
|
+
return [thisNameRefkey, " = ", paramNameRefkey, ";", _$createIntrinsic("hbr", {}), thisSizeRefkey, " = ", paramSizeRefkey, ";"];
|
|
427
|
+
}
|
|
428
|
+
})];
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
});
|
|
433
|
+
|
|
434
|
+
// TODO: assignments to members should have this. prefix
|
|
435
|
+
// e.g. this.name = name;
|
|
436
|
+
expect(tree).toRenderTo(coretest.d`
|
|
437
|
+
public class TestClass
|
|
438
|
+
{
|
|
439
|
+
private string _name;
|
|
440
|
+
private int _size;
|
|
441
|
+
public TestClass(string name, int size)
|
|
442
|
+
{
|
|
443
|
+
_name = name;
|
|
444
|
+
_size = size;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
`);
|
|
448
|
+
});
|
|
449
|
+
it("declares primary constructor with args", () => {
|
|
450
|
+
const paramNameRefkey = refkey();
|
|
451
|
+
const paramSizeRefkey = refkey();
|
|
452
|
+
const ctorParams = [{
|
|
453
|
+
name: "name",
|
|
454
|
+
type: "string",
|
|
455
|
+
refkey: paramNameRefkey
|
|
456
|
+
}, {
|
|
457
|
+
name: "size",
|
|
458
|
+
type: "int",
|
|
459
|
+
refkey: paramSizeRefkey
|
|
460
|
+
}];
|
|
461
|
+
expect(_$createComponent(Wrapper, {
|
|
462
|
+
get children() {
|
|
463
|
+
return _$createComponent(ClassDeclaration, {
|
|
464
|
+
"public": true,
|
|
465
|
+
name: "TestClass",
|
|
466
|
+
primaryConstructor: ctorParams,
|
|
467
|
+
get children() {
|
|
468
|
+
return _$createComponent(Property, {
|
|
469
|
+
name: "PrettyName",
|
|
470
|
+
type: "string",
|
|
471
|
+
get: true,
|
|
472
|
+
initializer: code`$"{${paramNameRefkey}} {${paramSizeRefkey}}"`
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
})).toRenderTo(`
|
|
478
|
+
public class TestClass(string name, int size)
|
|
479
|
+
{
|
|
480
|
+
string PrettyName { get; } = $"{name} {size}";
|
|
481
|
+
}
|
|
482
|
+
`);
|
|
483
|
+
});
|
|
484
|
+
it("primary constructor params conflict with method", () => {
|
|
485
|
+
const ctorParams = [{
|
|
486
|
+
name: "name",
|
|
487
|
+
type: "string"
|
|
488
|
+
}];
|
|
489
|
+
expect(_$createComponent(Wrapper, {
|
|
490
|
+
get children() {
|
|
491
|
+
return _$createComponent(NamePolicyContext.Provider, {
|
|
492
|
+
get value() {
|
|
493
|
+
return createNamePolicy(x => x);
|
|
494
|
+
},
|
|
495
|
+
get children() {
|
|
496
|
+
return _$createComponent(ClassDeclaration, {
|
|
497
|
+
"public": true,
|
|
498
|
+
name: "TestClass",
|
|
499
|
+
primaryConstructor: ctorParams,
|
|
500
|
+
get children() {
|
|
501
|
+
return _$createComponent(Field, {
|
|
502
|
+
name: "name",
|
|
503
|
+
type: "string"
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
})).toRenderTo(`
|
|
511
|
+
public class TestClass(string name)
|
|
512
|
+
{
|
|
513
|
+
string name_2;
|
|
514
|
+
}
|
|
515
|
+
`);
|
|
516
|
+
});
|
|
517
|
+
});
|
|
518
|
+
it("specify doc comment", () => {
|
|
519
|
+
expect(_$createComponent(TestNamespace, {
|
|
520
|
+
get children() {
|
|
521
|
+
return _$createComponent(ClassDeclaration, {
|
|
522
|
+
name: "Test",
|
|
523
|
+
doc: "This is a test"
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
})).toRenderTo(`
|
|
527
|
+
/// This is a test
|
|
528
|
+
class Test;
|
|
529
|
+
`);
|
|
530
|
+
});
|
|
531
|
+
it("supports class member doc comments", () => {
|
|
532
|
+
expect(_$createComponent(TestNamespace, {
|
|
533
|
+
get children() {
|
|
534
|
+
return _$createComponent(ClassDeclaration, {
|
|
535
|
+
name: "Test",
|
|
536
|
+
doc: "This is a test",
|
|
537
|
+
get children() {
|
|
538
|
+
return _$createComponent(Field, {
|
|
539
|
+
name: "Member",
|
|
540
|
+
"public": true,
|
|
541
|
+
type: "int",
|
|
542
|
+
doc: "This is a member"
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
})).toRenderTo(`
|
|
548
|
+
/// This is a test
|
|
549
|
+
class Test
|
|
550
|
+
{
|
|
551
|
+
/// This is a member
|
|
552
|
+
public int Member;
|
|
553
|
+
}
|
|
554
|
+
`);
|
|
555
|
+
});
|
|
556
|
+
it("specify attributes", () => {
|
|
557
|
+
expect(_$createComponent(TestNamespace, {
|
|
558
|
+
get children() {
|
|
559
|
+
return _$createComponent(ClassDeclaration, {
|
|
560
|
+
name: "Test",
|
|
561
|
+
get attributes() {
|
|
562
|
+
return [_$createComponent(Attribute, {
|
|
563
|
+
name: "Test"
|
|
564
|
+
})];
|
|
565
|
+
}
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
})).toRenderTo(`
|
|
569
|
+
[Test]
|
|
570
|
+
class Test;
|
|
571
|
+
`);
|
|
572
|
+
});
|
|
573
|
+
//# sourceMappingURL=declaration.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Constructor","EnumDeclaration","EnumMember","code","createNamePolicy","List","NamePolicyContext","Output","refkey","coretest","describe","expect","it","TestNamespace","toSourceText","createCSharpNamePolicy","Attribute","Field","Method","Property","SourceFile","ClassDeclaration","Wrapper","children","_$createComponent","name","toRenderTo","each","mod","_$mergeProps","abstract","partial","sealed","attributes","baseType","interfaceTypes","tree","type","d","virtual","inputTypeRefkey","testResultTypeRefkey","enumTypeRefkey","params","namePolicy","path","comma","hardline","_$createIntrinsic","parameters","returns","typeParameters","get","set","constraints","decl","toThrow","thisNameRefkey","thisSizeRefkey","paramNameRefkey","paramSizeRefkey","ctorParams","primaryConstructor","initializer","Provider","value","x","doc"],"sources":["../../../../src/components/class/declaration.test.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAASA,WAAW;AACpB,SAASC,eAAe;AACxB,SAASC,UAAU;AACnB,SAEEC,IAAI,EACJC,gBAAgB,EAChBC,IAAI,EACJC,iBAAiB,EACjBC,MAAM,EACNC,MAAM,QACD,gBAAgB;AACvB,OAAO,KAAKC,QAAQ,MAAM,wBAAwB;AAClD,SAASC,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AAC7C,SAASC,aAAa,EAAEC,YAAY;AACpC,SAASC,sBAAsB,QAAQ,sBAAsB;AAC7D,SAASC,SAAS;AAClB,SAASC,KAAK;AACd,SAASC,MAAM;AACf,SAASC,QAAQ;AACjB,SAASC,UAAU;AAEnB,SAASC,gBAAgB;AAEzB,SAASC,OAAOA,CAAC;EAAEC;AAAiC,CAAC,EAAE;EACrD,OAAAC,iBAAA,CAAQX,aAAa;IAAAU,QAAA,EAAEA;EAAQ;AACjC;AAEAX,EAAE,CAAC,gCAAgC,EAAE,MAAM;EACzCD,MAAM,CAAAa,iBAAA,CACHX,aAAa;IAAA,IAAAU,SAAA;MAAA,OAAAC,iBAAA,CACXH,gBAAgB;QA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