@alloy-js/csharp 0.20.0-dev.1 → 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/class/declaration.d.ts +2 -2
- package/dist/src/components/class/declaration.d.ts.map +1 -1
- package/dist/src/components/class/declaration.js +21 -34
- package/dist/src/components/class/declaration.js.map +1 -0
- package/dist/src/components/class/declaration.test.js +199 -200
- 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 +12 -20
- 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 +9 -8
- package/dist/src/components/field/field.test.js.map +1 -0
- package/dist/src/components/index.d.ts +7 -3
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +9 -4
- 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 +16 -15
- 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 +142 -150
- package/src/components/class/declaration.tsx +20 -32
- package/src/components/constructor/constructor.test.tsx +10 -16
- 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 +7 -7
- package/src/components/field/field.tsx +12 -22
- package/src/components/index.ts +7 -3
- 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 -23
- package/src/components/property/property.test.tsx +14 -14
- 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 +6919 -2532
- 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/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/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/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
|
@@ -1,27 +1,23 @@
|
|
|
1
1
|
import { createComponent as _$createComponent, mergeProps as _$mergeProps, createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import {
|
|
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";
|
|
3
6
|
import * as coretest from "@alloy-js/core/testing";
|
|
4
7
|
import { describe, expect, it } from "vitest";
|
|
5
|
-
import {
|
|
8
|
+
import { TestNamespace, toSourceText } from "../../../test/utils.js";
|
|
6
9
|
import { createCSharpNamePolicy } from "../../name-policy.js";
|
|
7
10
|
import { Attribute } from "../attributes/attributes.js";
|
|
8
11
|
import { Field } from "../field/field.js";
|
|
9
12
|
import { Method } from "../method/method.js";
|
|
10
|
-
import { Namespace } from "../Namespace.js";
|
|
11
13
|
import { Property } from "../property/property.js";
|
|
12
|
-
import { SourceFile } from "../
|
|
13
|
-
import { Constructor, EnumDeclaration, EnumMember } from "../stc/index.js";
|
|
14
|
+
import { SourceFile } from "../source-file/source-file.js";
|
|
14
15
|
import { ClassDeclaration } from "./declaration.js";
|
|
15
16
|
function Wrapper({
|
|
16
17
|
children
|
|
17
18
|
}) {
|
|
18
19
|
return _$createComponent(TestNamespace, {
|
|
19
|
-
|
|
20
|
-
return _$createComponent(SourceFile, {
|
|
21
|
-
path: "Test.cs",
|
|
22
|
-
children: children
|
|
23
|
-
});
|
|
24
|
-
}
|
|
20
|
+
children: children
|
|
25
21
|
});
|
|
26
22
|
}
|
|
27
23
|
it("declares class with no members", () => {
|
|
@@ -76,6 +72,27 @@ describe("modifiers", () => {
|
|
|
76
72
|
public abstract partial class TestClass;
|
|
77
73
|
`);
|
|
78
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
|
+
});
|
|
79
96
|
});
|
|
80
97
|
describe("base", () => {
|
|
81
98
|
it("define base class", () => {
|
|
@@ -117,63 +134,65 @@ describe("base", () => {
|
|
|
117
134
|
});
|
|
118
135
|
});
|
|
119
136
|
it("declares class with some members", () => {
|
|
120
|
-
const
|
|
121
|
-
"public": true,
|
|
122
|
-
name: "TestClass",
|
|
137
|
+
const tree = _$createComponent(TestNamespace, {
|
|
123
138
|
get children() {
|
|
124
|
-
return _$createComponent(
|
|
139
|
+
return _$createComponent(ClassDeclaration, {
|
|
140
|
+
"public": true,
|
|
141
|
+
name: "TestClass",
|
|
125
142
|
get children() {
|
|
126
|
-
return
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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
|
+
});
|
|
135
156
|
}
|
|
136
157
|
});
|
|
137
158
|
}
|
|
138
|
-
})
|
|
139
|
-
expect(
|
|
140
|
-
|
|
159
|
+
});
|
|
160
|
+
expect(tree).toRenderTo(coretest.d`
|
|
161
|
+
public class TestClass
|
|
141
162
|
{
|
|
142
|
-
public
|
|
143
|
-
|
|
144
|
-
public string MemberOne;
|
|
145
|
-
public int MemberTwo;
|
|
146
|
-
}
|
|
163
|
+
public string MemberOne;
|
|
164
|
+
public int MemberTwo;
|
|
147
165
|
}
|
|
148
166
|
`);
|
|
149
167
|
});
|
|
150
168
|
it("declares class with some methods", () => {
|
|
151
|
-
const
|
|
152
|
-
"public": true,
|
|
153
|
-
name: "TestClass",
|
|
169
|
+
const tree = _$createComponent(TestNamespace, {
|
|
154
170
|
get children() {
|
|
155
|
-
return _$createComponent(
|
|
171
|
+
return _$createComponent(ClassDeclaration, {
|
|
172
|
+
"public": true,
|
|
173
|
+
name: "TestClass",
|
|
156
174
|
get children() {
|
|
157
|
-
return
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
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
|
+
});
|
|
165
187
|
}
|
|
166
188
|
});
|
|
167
189
|
}
|
|
168
|
-
})
|
|
169
|
-
expect(
|
|
170
|
-
|
|
190
|
+
});
|
|
191
|
+
expect(tree).toRenderTo(coretest.d`
|
|
192
|
+
public class TestClass
|
|
171
193
|
{
|
|
172
|
-
public
|
|
173
|
-
{
|
|
174
|
-
public void MethodOne() {}
|
|
175
|
-
private virtual void MethodTwo() {}
|
|
176
|
-
}
|
|
194
|
+
public void MethodOne() {}
|
|
195
|
+
private virtual void MethodTwo() {}
|
|
177
196
|
}
|
|
178
197
|
`);
|
|
179
198
|
});
|
|
@@ -188,84 +207,75 @@ it("uses refkeys for members, params, and return type", () => {
|
|
|
188
207
|
name: "BodyParam",
|
|
189
208
|
type: inputTypeRefkey
|
|
190
209
|
}];
|
|
191
|
-
|
|
210
|
+
expect(_$createComponent(Output, {
|
|
192
211
|
get namePolicy() {
|
|
193
212
|
return createCSharpNamePolicy();
|
|
194
213
|
},
|
|
195
214
|
get children() {
|
|
196
|
-
return _$createComponent(
|
|
197
|
-
|
|
215
|
+
return _$createComponent(SourceFile, {
|
|
216
|
+
path: "Test.cs",
|
|
198
217
|
get children() {
|
|
199
|
-
return _$createComponent(
|
|
200
|
-
|
|
218
|
+
return [_$createComponent(EnumDeclaration, {
|
|
219
|
+
"public": true,
|
|
220
|
+
name: "TestEnum",
|
|
221
|
+
refkey: enumTypeRefkey,
|
|
201
222
|
get children() {
|
|
202
|
-
return
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
refkey: enumTypeRefkey,
|
|
223
|
+
return _$createComponent(List, {
|
|
224
|
+
comma: true,
|
|
225
|
+
hardline: true,
|
|
206
226
|
get children() {
|
|
207
|
-
return _$createComponent(
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
name: "One"
|
|
213
|
-
}), _$createComponent(EnumMember, {
|
|
214
|
-
name: "Two"
|
|
215
|
-
})];
|
|
216
|
-
}
|
|
217
|
-
});
|
|
227
|
+
return [_$createComponent(EnumMember, {
|
|
228
|
+
name: "One"
|
|
229
|
+
}), _$createComponent(EnumMember, {
|
|
230
|
+
name: "Two"
|
|
231
|
+
})];
|
|
218
232
|
}
|
|
219
|
-
})
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
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, {
|
|
228
252
|
"public": true,
|
|
229
|
-
name: "
|
|
253
|
+
name: "MethodOne",
|
|
254
|
+
parameters: params,
|
|
255
|
+
returns: testResultTypeRefkey,
|
|
230
256
|
get children() {
|
|
231
|
-
return [
|
|
232
|
-
"private": true,
|
|
233
|
-
name: "MemberOne",
|
|
234
|
-
type: enumTypeRefkey
|
|
235
|
-
}), _$createIntrinsic("hbr", {}), _$createComponent(Method, {
|
|
236
|
-
"public": true,
|
|
237
|
-
name: "MethodOne",
|
|
238
|
-
parameters: params,
|
|
239
|
-
returns: testResultTypeRefkey,
|
|
240
|
-
get children() {
|
|
241
|
-
return ["return new ", testResultTypeRefkey, "();"];
|
|
242
|
-
}
|
|
243
|
-
})];
|
|
257
|
+
return ["return new ", testResultTypeRefkey, "();"];
|
|
244
258
|
}
|
|
245
259
|
})];
|
|
246
260
|
}
|
|
247
|
-
});
|
|
261
|
+
})];
|
|
248
262
|
}
|
|
249
263
|
});
|
|
250
264
|
}
|
|
251
|
-
}))
|
|
252
|
-
|
|
253
|
-
namespace TestCode
|
|
265
|
+
})).toRenderTo(`
|
|
266
|
+
public enum TestEnum
|
|
254
267
|
{
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
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)
|
|
263
277
|
{
|
|
264
|
-
|
|
265
|
-
public TestResult MethodOne(int intParam, TestInput bodyParam)
|
|
266
|
-
{
|
|
267
|
-
return new TestResult();
|
|
268
|
-
}
|
|
278
|
+
return new TestResult();
|
|
269
279
|
}
|
|
270
280
|
}
|
|
271
281
|
`);
|
|
@@ -281,46 +291,38 @@ describe("with type parameters", () => {
|
|
|
281
291
|
}];
|
|
282
292
|
expect(_$createComponent(TestNamespace, {
|
|
283
293
|
get children() {
|
|
284
|
-
return _$createComponent(
|
|
285
|
-
|
|
294
|
+
return _$createComponent(ClassDeclaration, {
|
|
295
|
+
"public": true,
|
|
296
|
+
name: "TestClass",
|
|
297
|
+
typeParameters: typeParameters,
|
|
286
298
|
get children() {
|
|
287
|
-
return _$createComponent(
|
|
288
|
-
"public": true,
|
|
289
|
-
name: "TestClass",
|
|
290
|
-
typeParameters: typeParameters,
|
|
299
|
+
return _$createComponent(List, {
|
|
291
300
|
get children() {
|
|
292
|
-
return _$createComponent(
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
set: true
|
|
308
|
-
})];
|
|
309
|
-
}
|
|
310
|
-
});
|
|
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
|
+
})];
|
|
311
316
|
}
|
|
312
317
|
});
|
|
313
318
|
}
|
|
314
319
|
});
|
|
315
320
|
}
|
|
316
321
|
})).toRenderTo(`
|
|
317
|
-
|
|
322
|
+
public class TestClass<T, U>
|
|
318
323
|
{
|
|
319
|
-
|
|
320
|
-
{
|
|
321
|
-
T PropA { get; set; }
|
|
322
|
-
U PropB { get; set; }
|
|
323
|
-
}
|
|
324
|
+
T PropA { get; set; }
|
|
325
|
+
U PropB { get; set; }
|
|
324
326
|
}
|
|
325
327
|
`);
|
|
326
328
|
});
|
|
@@ -343,10 +345,10 @@ describe("with type parameters", () => {
|
|
|
343
345
|
}
|
|
344
346
|
})).toRenderTo(`
|
|
345
347
|
public class TestClass<T, U>
|
|
346
|
-
|
|
347
|
-
|
|
348
|
+
where T : IFoo
|
|
349
|
+
where U : IBar
|
|
348
350
|
{
|
|
349
|
-
|
|
351
|
+
// Body
|
|
350
352
|
}
|
|
351
353
|
`);
|
|
352
354
|
});
|
|
@@ -363,26 +365,27 @@ it("declares class with invalid members", () => {
|
|
|
363
365
|
})];
|
|
364
366
|
}
|
|
365
367
|
});
|
|
366
|
-
expect(() => toSourceText(decl)).toThrow("
|
|
368
|
+
expect(() => toSourceText(decl)).toThrow("EnumMember must be used within an EnumDeclaration.");
|
|
367
369
|
});
|
|
368
370
|
describe("constructor", () => {
|
|
369
371
|
it("declares with constructor", () => {
|
|
370
|
-
const
|
|
371
|
-
"public": true,
|
|
372
|
-
name: "TestClass",
|
|
372
|
+
const tree = _$createComponent(TestNamespace, {
|
|
373
373
|
get children() {
|
|
374
|
-
return _$createComponent(
|
|
375
|
-
"public": true
|
|
374
|
+
return _$createComponent(ClassDeclaration, {
|
|
375
|
+
"public": true,
|
|
376
|
+
name: "TestClass",
|
|
377
|
+
get children() {
|
|
378
|
+
return _$createComponent(Constructor, {
|
|
379
|
+
"public": true
|
|
380
|
+
});
|
|
381
|
+
}
|
|
376
382
|
});
|
|
377
383
|
}
|
|
378
|
-
})
|
|
379
|
-
expect(
|
|
380
|
-
|
|
384
|
+
});
|
|
385
|
+
expect(tree).toRenderTo(coretest.d`
|
|
386
|
+
public class TestClass
|
|
381
387
|
{
|
|
382
|
-
public
|
|
383
|
-
{
|
|
384
|
-
public TestClass() {}
|
|
385
|
-
}
|
|
388
|
+
public TestClass() {}
|
|
386
389
|
}
|
|
387
390
|
`);
|
|
388
391
|
});
|
|
@@ -400,44 +403,45 @@ describe("constructor", () => {
|
|
|
400
403
|
type: "int",
|
|
401
404
|
refkey: paramSizeRefkey
|
|
402
405
|
}];
|
|
403
|
-
const
|
|
404
|
-
"public": true,
|
|
405
|
-
name: "TestClass",
|
|
406
|
+
const tree = _$createComponent(TestNamespace, {
|
|
406
407
|
get children() {
|
|
407
|
-
return
|
|
408
|
-
"private": true,
|
|
409
|
-
name: "name",
|
|
410
|
-
type: "string",
|
|
411
|
-
refkey: thisNameRefkey
|
|
412
|
-
}), _$createIntrinsic("hbr", {}), _$createComponent(Field, {
|
|
413
|
-
"private": true,
|
|
414
|
-
name: "size",
|
|
415
|
-
type: "int",
|
|
416
|
-
refkey: thisSizeRefkey
|
|
417
|
-
}), _$createIntrinsic("hbr", {}), _$createComponent(Constructor, {
|
|
408
|
+
return _$createComponent(ClassDeclaration, {
|
|
418
409
|
"public": true,
|
|
419
|
-
|
|
410
|
+
name: "TestClass",
|
|
420
411
|
get children() {
|
|
421
|
-
return [
|
|
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
|
+
})];
|
|
422
429
|
}
|
|
423
|
-
})
|
|
430
|
+
});
|
|
424
431
|
}
|
|
425
|
-
})
|
|
432
|
+
});
|
|
426
433
|
|
|
427
434
|
// TODO: assignments to members should have this. prefix
|
|
428
435
|
// e.g. this.name = name;
|
|
429
|
-
expect(
|
|
430
|
-
|
|
436
|
+
expect(tree).toRenderTo(coretest.d`
|
|
437
|
+
public class TestClass
|
|
431
438
|
{
|
|
432
|
-
|
|
439
|
+
private string _name;
|
|
440
|
+
private int _size;
|
|
441
|
+
public TestClass(string name, int size)
|
|
433
442
|
{
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
public TestClass(string name, int size)
|
|
437
|
-
{
|
|
438
|
-
_name = name;
|
|
439
|
-
_size = size;
|
|
440
|
-
}
|
|
443
|
+
_name = name;
|
|
444
|
+
_size = size;
|
|
441
445
|
}
|
|
442
446
|
}
|
|
443
447
|
`);
|
|
@@ -471,12 +475,9 @@ describe("constructor", () => {
|
|
|
471
475
|
});
|
|
472
476
|
}
|
|
473
477
|
})).toRenderTo(`
|
|
474
|
-
|
|
478
|
+
public class TestClass(string name, int size)
|
|
475
479
|
{
|
|
476
|
-
|
|
477
|
-
{
|
|
478
|
-
string PrettyName { get; } = $"{name} {size}";
|
|
479
|
-
}
|
|
480
|
+
string PrettyName { get; } = $"{name} {size}";
|
|
480
481
|
}
|
|
481
482
|
`);
|
|
482
483
|
});
|
|
@@ -507,12 +508,9 @@ describe("constructor", () => {
|
|
|
507
508
|
});
|
|
508
509
|
}
|
|
509
510
|
})).toRenderTo(`
|
|
510
|
-
|
|
511
|
+
public class TestClass(string name)
|
|
511
512
|
{
|
|
512
|
-
|
|
513
|
-
{
|
|
514
|
-
string name_2;
|
|
515
|
-
}
|
|
513
|
+
string name_2;
|
|
516
514
|
}
|
|
517
515
|
`);
|
|
518
516
|
});
|
|
@@ -550,8 +548,8 @@ it("supports class member doc comments", () => {
|
|
|
550
548
|
/// This is a test
|
|
551
549
|
class Test
|
|
552
550
|
{
|
|
553
|
-
|
|
554
|
-
|
|
551
|
+
/// This is a member
|
|
552
|
+
public int Member;
|
|
555
553
|
}
|
|
556
554
|
`);
|
|
557
555
|
});
|
|
@@ -571,4 +569,5 @@ it("specify attributes", () => {
|
|
|
571
569
|
[Test]
|
|
572
570
|
class Test;
|
|
573
571
|
`);
|
|
574
|
-
});
|
|
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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;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constructor.d.ts","sourceRoot":"","sources":["../../../../src/components/constructor/constructor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constructor.d.ts","sourceRoot":"","sources":["../../../../src/components/constructor/constructor.tsx"],"names":[],"mappings":"AACA,OAAO,EAAwC,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EACL,eAAe,EAGhB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,cAAc,EAAc,MAAM,8BAA8B,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,6BAA6B;IAC7B,UAAU,CAAC,EAAE,cAAc,EAAE,CAAC;IAE9B,aAAa;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,uBAAuB;IACvB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,YAqBlD"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { MethodScope } from "#components/method-scope.js";
|
|
3
|
+
import { Block, MemberDeclaration, MemberName } from "@alloy-js/core";
|
|
3
4
|
import { computeModifiersPrefix, getAccessModifier } from "../../modifiers.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { CSharpMemberScope, useCSharpScope } from "../../symbols/scopes.js";
|
|
5
|
+
import { useNamedTypeScope } from "../../scopes/contexts.js";
|
|
6
|
+
import { MethodSymbol } from "../../symbols/method.js";
|
|
7
7
|
import { Parameters } from "../parameters/parameters.js";
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -11,26 +11,18 @@ import { Parameters } from "../parameters/parameters.js";
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
export function Constructor(props) {
|
|
14
|
-
const scope =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const name = useCSharpNamePolicy().getName(scope.owner.name, "class-method");
|
|
19
|
-
const ctorSymbol = new CSharpOutputSymbol(name, {
|
|
20
|
-
scope,
|
|
21
|
-
refkeys: props.refkey ?? refkey(name)
|
|
22
|
-
});
|
|
23
|
-
const ctorDeclScope = new CSharpMemberScope("constructor-decl", {
|
|
24
|
-
owner: ctorSymbol
|
|
14
|
+
const scope = useNamedTypeScope();
|
|
15
|
+
const name = scope.ownerSymbol.name;
|
|
16
|
+
const ctorSymbol = new MethodSymbol(name, scope.members, "constructor", {
|
|
17
|
+
refkeys: props.refkey
|
|
25
18
|
});
|
|
26
19
|
const modifiers = computeModifiersPrefix([getAccessModifier(props)]);
|
|
27
|
-
return _$createComponent(
|
|
20
|
+
return _$createComponent(MemberDeclaration, {
|
|
28
21
|
symbol: ctorSymbol,
|
|
29
22
|
get children() {
|
|
30
|
-
return _$createComponent(
|
|
31
|
-
value: ctorDeclScope,
|
|
23
|
+
return _$createComponent(MethodScope, {
|
|
32
24
|
get children() {
|
|
33
|
-
return [modifiers, _$createComponent(
|
|
25
|
+
return [modifiers, _$createComponent(MemberName, {}), _$createComponent(Parameters, {
|
|
34
26
|
get parameters() {
|
|
35
27
|
return props.parameters;
|
|
36
28
|
}
|
|
@@ -44,4 +36,5 @@ export function Constructor(props) {
|
|
|
44
36
|
});
|
|
45
37
|
}
|
|
46
38
|
});
|
|
47
|
-
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=constructor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MethodScope","Block","MemberDeclaration","MemberName","computeModifiersPrefix","getAccessModifier","useNamedTypeScope","MethodSymbol","Parameters","Constructor","props","scope","name","ownerSymbol","ctorSymbol","members","refkeys","refkey","modifiers","_$createComponent","symbol","children","parameters","newline"],"sources":["../../../../src/components/constructor/constructor.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAASA,WAAW;AACpB,SAASC,KAAK,EAAEC,iBAAiB,EAAEC,UAAU,QAAgB,gBAAgB;AAE7E,SAEEC,sBAAsB,EACtBC,iBAAiB,QACZ,oBAAoB;AAC3B,SAASC,iBAAiB,QAAQ,0BAA0B;AAC5D,SAASC,YAAY,QAAQ,yBAAyB;AACtD,SAAyBC,UAAU;;AAEnC;AACA;AACA;;AAYA,OAAO,SAASC,WAAWA,CAACC,KAAuB,EAAE;EACnD,MAAMC,KAAK,GAAGL,iBAAiB,CAAC,CAAC;EAEjC,MAAMM,IAAI,GAAGD,KAAK,CAACE,WAAW,CAACD,IAAI;EAEnC,MAAME,UAAU,GAAG,IAAIP,YAAY,CAACK,IAAI,EAAED,KAAK,CAACI,OAAO,EAAE,aAAa,EAAE;IACtEC,OAAO,EAAEN,KAAK,CAACO;EACjB,CAAC,CAAC;EAEF,MAAMC,SAAS,GAAGd,sBAAsB,CAAC,CAACC,iBAAiB,CAACK,KAAK,CAAC,CAAC,CAAC;EAEpE,OAAAS,iBAAA,CACGjB,iBAAiB;IAACkB,MAAM,EAAEN,UAAU;IAAA,IAAAO,SAAA;MAAA,OAAAF,iBAAA,CAClCnB,WAAW;QAAA,IAAAqB,SAAA;UAAA,QACTH,SAAS,EAAAC,iBAAA,CACThB,UAAU,OAAAgB,iBAAA,CACVX,UAAU;YAAA,IAACc,UAAUA,CAAA;cAAA,OAAEZ,KAAK,CAACY,UAAU;YAAA;UAAA,IAAAH,iBAAA,CACvClB,KAAK;YAACsB,OAAO;YAAA,IAAAF,SAAA;cAAA,OAAEX,KAAK,CAACW,QAAQ;YAAA;UAAA;QAAA;MAAA;IAAA;EAAA;AAItC","ignoreList":[]}
|