@alloy-js/csharp 0.19.0 → 0.20.0-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/src/components/{ClassDeclaration.d.ts → class/declaration.d.ts} +29 -11
  2. package/dist/src/components/class/declaration.d.ts.map +1 -0
  3. package/dist/src/components/{ClassDeclaration.js → class/declaration.js} +22 -14
  4. package/dist/src/components/class/declaration.test.d.ts +2 -0
  5. package/dist/src/components/class/declaration.test.d.ts.map +1 -0
  6. package/dist/{test/class-declaration.test.js → src/components/class/declaration.test.js} +190 -100
  7. package/dist/src/components/constructor/constructor.test.js +1 -1
  8. package/dist/src/components/field/field.test.js +1 -1
  9. package/dist/src/components/index.d.ts +1 -1
  10. package/dist/src/components/index.d.ts.map +1 -1
  11. package/dist/src/components/index.js +1 -1
  12. package/dist/src/components/parameters/parameters.d.ts.map +1 -1
  13. package/dist/src/components/parameters/parameters.js +1 -1
  14. package/dist/src/components/property/property.test.js +1 -1
  15. package/dist/tsconfig.tsbuildinfo +1 -1
  16. package/package.json +6 -6
  17. package/{test/class-declaration.test.tsx → src/components/class/declaration.test.tsx} +204 -125
  18. package/src/components/{ClassDeclaration.tsx → class/declaration.tsx} +53 -22
  19. package/src/components/constructor/constructor.test.tsx +1 -1
  20. package/src/components/field/field.test.tsx +1 -1
  21. package/src/components/index.ts +1 -1
  22. package/src/components/parameters/parameters.tsx +3 -1
  23. package/src/components/property/property.test.tsx +1 -1
  24. package/temp/api.json +41 -9
  25. package/dist/src/components/ClassDeclaration.d.ts.map +0 -1
  26. package/dist/test/class-declaration.test.d.ts +0 -2
  27. package/dist/test/class-declaration.test.d.ts.map +0 -1
@@ -8,7 +8,7 @@ import { Name } from "../Name.js";
8
8
  export function Parameter(props) {
9
9
  const name = useCSharpNamePolicy().getName(props.name, "parameter");
10
10
  const scope = useCSharpScope();
11
- if (scope.kind !== "member" || scope.name !== "constructor-decl" && scope.name !== "method-decl") {
11
+ if (scope.kind !== "member" || scope.name !== "constructor-decl" && scope.name !== "method-decl" && scope.name !== "class-decl") {
12
12
  throw new Error("can't define a parameter outside of a constructor-decl or method-decl scope");
13
13
  }
14
14
  const memberSymbol = new CSharpOutputSymbol(name, {
@@ -2,7 +2,7 @@ import { memo as _$memo, createComponent as _$createComponent, mergeProps as _$m
2
2
  import { describe, expect, it } from "vitest";
3
3
  import { TestNamespace } from "../../../test/utils.js";
4
4
  import { Attribute } from "../attributes/attributes.js";
5
- import { ClassDeclaration } from "../ClassDeclaration.js";
5
+ import { ClassDeclaration } from "../class/declaration.js";
6
6
  import { Property } from "./property.js";
7
7
  const Wrapper = props => _$createComponent(TestNamespace, {
8
8
  get children() {