@alloy-js/go 0.3.1-dev.1 → 0.3.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.
package/docs/api/index.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # @alloy-js/go API Reference
2
2
 
3
- - [components](components/index.md) (28 items)
3
+ - [components](components/index.md) (27 items)
4
4
  - [contexts](contexts/index.md) (2 items)
5
5
  - [functions](functions/index.md) (27 items)
6
- - [types](types/index.md) (36 items)
6
+ - [types](types/index.md) (37 items)
7
7
  - [variables](variables/index.md) (1 items)
@@ -0,0 +1,7 @@
1
+ # ReferenceProps
2
+
3
+ ## Members
4
+
5
+ | | | |
6
+ | ------ | ------------------------------------- | - |
7
+ | refkey | [Refkey](../../../core/types/refkey/) | |
@@ -30,6 +30,7 @@
30
30
  - [PackageDescriptor](PackageDescriptor.md) — Extends [NamedTypeDescriptor](../namedtypedescriptor/)\<M>
31
31
  - [PackageSymbol](PackageSymbol.md) — A symbol for a package in Go.
32
32
  - [PackageSymbolOptions](PackageSymbolOptions.md) — Extends [OutputSymbolOptions](../../../core/types/outputsymboloptions/)
33
+ - [ReferenceProps](ReferenceProps.md)
33
34
  - [ResolveDescriptor](ResolveDescriptor.md) — type ResolveDescriptor<D> = D extends NamedTypeDescriptor<infer M> ?
34
35
  - [SourceFileHeaderProps](SourceFileHeaderProps.md)
35
36
  - [StrictDescriptor](StrictDescriptor.md) — type StrictDescriptor = PackageDescriptor<Record<string, StrictDescriptor>> | FieldDescriptor | FunctionDescriptor | Met
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alloy-js/go",
3
- "version": "0.3.1-dev.1",
3
+ "version": "0.3.1",
4
4
  "description": "Go bindings for Alloy",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,18 +27,19 @@
27
27
  "author": "",
28
28
  "license": "MIT",
29
29
  "dependencies": {
30
- "@alloy-js/core": "~0.23.1 || >= 0.24.0-dev.7",
31
30
  "change-case": "^5.4.4",
32
- "pathe": "^2.0.3"
31
+ "pathe": "^2.0.3",
32
+ "@alloy-js/core": "~0.24.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@alloy-js/cli": "~0.23.0 || >= 0.24.0-dev.1",
36
- "@alloy-js/rollup-plugin": "~0.1.1 || >= 0.1.2-dev.2",
37
- "@microsoft/api-extractor": "~7.52.8",
38
- "@rollup/plugin-typescript": "^12.1.2",
39
- "concurrently": "^9.2.0",
40
- "typescript": "^5.8.3",
41
- "vitest": "3.2.4"
35
+ "@microsoft/api-extractor": "~7.58.8",
36
+ "@rollup/plugin-typescript": "^12.3.0",
37
+ "@types/node": "^25.9.2",
38
+ "concurrently": "^10.0.3",
39
+ "typescript": "^6.0.3",
40
+ "vitest": "4.1.8",
41
+ "@alloy-js/cli": "~0.24.0",
42
+ "@alloy-js/rollup-plugin": "~0.1.2"
42
43
  },
43
44
  "type": "module",
44
45
  "scripts": {
@@ -56,8 +56,7 @@ export interface InterfaceDeclarationProps {
56
56
  * This is a combination of `InterfaceDeclarationProps` and `TypeDeclarationProps`.
57
57
  */
58
58
  export interface InterfaceTypeDeclarationProps
59
- extends InterfaceDeclarationProps,
60
- TypeDeclarationProps {}
59
+ extends InterfaceDeclarationProps, TypeDeclarationProps {}
61
60
 
62
61
  /**
63
62
  * Wrapper for creating a named interface type declaration.
@@ -50,8 +50,7 @@ export interface StructDeclarationProps {
50
50
  * This is a combination of `StructDeclarationProps` and `TypeDeclarationProps`.
51
51
  */
52
52
  export interface StructTypeDeclarationProps
53
- extends StructDeclarationProps,
54
- TypeDeclarationProps {}
53
+ extends StructDeclarationProps, TypeDeclarationProps {}
55
54
 
56
55
  /**
57
56
  * Wrapper for creating a named struct type declaration.
@@ -42,26 +42,30 @@ export interface NamedTypeDescriptor<M extends Record<string, Descriptor>> {
42
42
  members: M;
43
43
  }
44
44
 
45
- export interface TypeDescriptor<M extends Record<string, Descriptor>>
46
- extends NamedTypeDescriptor<M> {
45
+ export interface TypeDescriptor<
46
+ M extends Record<string, Descriptor>,
47
+ > extends NamedTypeDescriptor<M> {
47
48
  kind: "type";
48
49
  }
49
50
 
50
- export interface PackageDescriptor<M extends Record<string, Descriptor>>
51
- extends NamedTypeDescriptor<M> {
51
+ export interface PackageDescriptor<
52
+ M extends Record<string, Descriptor>,
53
+ > extends NamedTypeDescriptor<M> {
52
54
  kind: "package";
53
55
  path?: string;
54
56
  name?: string;
55
57
  members: M;
56
58
  }
57
59
 
58
- export interface StructDescriptor<M extends Record<string, Descriptor>>
59
- extends NamedTypeDescriptor<M> {
60
+ export interface StructDescriptor<
61
+ M extends Record<string, Descriptor>,
62
+ > extends NamedTypeDescriptor<M> {
60
63
  kind: "struct";
61
64
  }
62
65
 
63
- export interface InterfaceDescriptor<M extends Record<string, Descriptor>>
64
- extends NamedTypeDescriptor<M> {
66
+ export interface InterfaceDescriptor<
67
+ M extends Record<string, Descriptor>,
68
+ > extends NamedTypeDescriptor<M> {
65
69
  kind: "interface";
66
70
  }
67
71
 
package/temp/api.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "metadata": {
3
3
  "toolPackage": "@microsoft/api-extractor",
4
- "toolVersion": "7.52.9",
4
+ "toolVersion": "7.58.8",
5
5
  "schemaVersion": 1011,
6
6
  "oldestForwardsCompatibleVersion": 1001,
7
7
  "tsdocConfig": {
@@ -114,6 +114,22 @@
114
114
  "tagName": "@virtual",
115
115
  "syntaxKind": "modifier"
116
116
  },
117
+ {
118
+ "tagName": "@jsx",
119
+ "syntaxKind": "block"
120
+ },
121
+ {
122
+ "tagName": "@jsxRuntime",
123
+ "syntaxKind": "block"
124
+ },
125
+ {
126
+ "tagName": "@jsxFrag",
127
+ "syntaxKind": "block"
128
+ },
129
+ {
130
+ "tagName": "@jsxImportSource",
131
+ "syntaxKind": "block"
132
+ },
117
133
  {
118
134
  "tagName": "@betaDocumentation",
119
135
  "syntaxKind": "modifier"
@@ -175,7 +191,7 @@
175
191
  {
176
192
  "kind": "Function",
177
193
  "canonicalReference": "@alloy-js/go!BlockComment:function(1)",
178
- "docComment": "/**\n * A Go block comment. In go, line comments are the norm, so consider\n * using {@link LineComment} instead. The children of this component\n * are joined with two hard linebreaks. This is useful for creating\n * block comments with multiple paragraphs.\n */\n",
194
+ "docComment": "/**\n * A Go block comment. In go, line comments are the norm, so consider using {@link LineComment} instead. The children of this component are joined with two hard linebreaks. This is useful for creating block comments with multiple paragraphs.\n */\n",
179
195
  "excerptTokens": [
180
196
  {
181
197
  "kind": "Content",
@@ -2436,7 +2452,7 @@
2436
2452
  {
2437
2453
  "kind": "PropertySignature",
2438
2454
  "canonicalReference": "@alloy-js/go!FunctionProps#singleLine:member",
2439
- "docComment": "/**\n * Whether to render the function in a single line.\n * This will only compile if `children` is a single line as well.\n * This is not common in Go, so use with caution.\n */\n",
2455
+ "docComment": "/**\n * Whether to render the function in a single line. This will only compile if `children` is a single line as well. This is not common in Go, so use with caution.\n */\n",
2440
2456
  "excerptTokens": [
2441
2457
  {
2442
2458
  "kind": "Content",
@@ -3145,7 +3161,7 @@
3145
3161
  {
3146
3162
  "kind": "Class",
3147
3163
  "canonicalReference": "@alloy-js/go!GoNamedTypeScope:class",
3148
- "docComment": "/**\n * This scope contains NamedTypeSymbols for types that are declared in\n * containers like packages. This scope is a member scope which whose\n * member symbol is a NamedTypeSymbol.\n */\n",
3164
+ "docComment": "/**\n * This scope contains NamedTypeSymbols for types that are declared in containers like packages. This scope is a member scope which whose member symbol is a NamedTypeSymbol.\n */\n",
3149
3165
  "excerptTokens": [
3150
3166
  {
3151
3167
  "kind": "Content",
@@ -3394,7 +3410,7 @@
3394
3410
  {
3395
3411
  "kind": "Property",
3396
3412
  "canonicalReference": "@alloy-js/go!GoNamedTypeScope#typeParameters:member",
3397
- "docComment": "/**\n * For now, we stuff type parameters into the member scope. This is to ensure\n * name conflicts are handled correctly.\n */\n",
3413
+ "docComment": "/**\n * For now, we stuff type parameters into the member scope. This is to ensure name conflicts are handled correctly.\n */\n",
3398
3414
  "excerptTokens": [
3399
3415
  {
3400
3416
  "kind": "Content",
@@ -3957,7 +3973,7 @@
3957
3973
  {
3958
3974
  "kind": "Class",
3959
3975
  "canonicalReference": "@alloy-js/go!GoSymbol:class",
3960
- "docComment": "/**\n * This is the base type for all symbols in Go.\n *\n * Many subtypes of this symbol exist for specific purposes. However, this symbol\n * may be used in cases where a more specific symbol is not required.\n */\n",
3976
+ "docComment": "/**\n * This is the base type for all symbols in Go.\n *\n * Many subtypes of this symbol exist for specific purposes. However, this symbol may be used in cases where a more specific symbol is not required.\n */\n",
3961
3977
  "excerptTokens": [
3962
3978
  {
3963
3979
  "kind": "Content",
@@ -4625,7 +4641,7 @@
4625
4641
  {
4626
4642
  "kind": "Interface",
4627
4643
  "canonicalReference": "@alloy-js/go!InterfaceDeclarationProps:interface",
4628
- "docComment": "/**\n * Properties for creating an interface declaration.\n * This can be used for both named and anonymous interfaces.\n * For named interfaces, use `InterfaceTypeDeclarationProps` instead.\n */\n",
4644
+ "docComment": "/**\n * Properties for creating an interface declaration. This can be used for both named and anonymous interfaces. For named interfaces, use `InterfaceTypeDeclarationProps` instead.\n */\n",
4629
4645
  "excerptTokens": [
4630
4646
  {
4631
4647
  "kind": "Content",
@@ -4696,7 +4712,7 @@
4696
4712
  {
4697
4713
  "kind": "PropertySignature",
4698
4714
  "canonicalReference": "@alloy-js/go!InterfaceDeclarationProps#singleLine:member",
4699
- "docComment": "/**\n * Whether to render the interface in a single line.\n * This will only compile if `children` is a single line as well.\n * This is not common in Go, so use with caution.\n */\n",
4715
+ "docComment": "/**\n * Whether to render the interface in a single line. This will only compile if `children` is a single line as well. This is not common in Go, so use with caution.\n */\n",
4700
4716
  "excerptTokens": [
4701
4717
  {
4702
4718
  "kind": "Content",
@@ -5233,7 +5249,7 @@
5233
5249
  {
5234
5250
  "kind": "Interface",
5235
5251
  "canonicalReference": "@alloy-js/go!InterfaceTypeDeclarationProps:interface",
5236
- "docComment": "/**\n * Properties for creating a named interface type declaration.\n * This is a combination of `InterfaceDeclarationProps` and `TypeDeclarationProps`.\n */\n",
5252
+ "docComment": "/**\n * Properties for creating a named interface type declaration. This is a combination of `InterfaceDeclarationProps` and `TypeDeclarationProps`.\n */\n",
5237
5253
  "excerptTokens": [
5238
5254
  {
5239
5255
  "kind": "Content",
@@ -5326,7 +5342,7 @@
5326
5342
  {
5327
5343
  "kind": "Function",
5328
5344
  "canonicalReference": "@alloy-js/go!LineComment:function(1)",
5329
- "docComment": "/**\n * A Go line comment block. The children of this component\n * are joined with two hard linebreaks. This is useful for creating\n * line comments with multiple paragraphs.\n */\n",
5345
+ "docComment": "/**\n * A Go line comment block. The children of this component are joined with two hard linebreaks. This is useful for creating line comments with multiple paragraphs.\n */\n",
5330
5346
  "excerptTokens": [
5331
5347
  {
5332
5348
  "kind": "Content",
@@ -6944,7 +6960,7 @@
6944
6960
  "excerptTokens": [
6945
6961
  {
6946
6962
  "kind": "Content",
6947
- "text": "export declare function Reference({ refkey }: "
6963
+ "text": "export declare function Reference(input: "
6948
6964
  },
6949
6965
  {
6950
6966
  "kind": "Reference",
@@ -6979,6 +6995,14 @@
6979
6995
  "parameters": [
6980
6996
  {
6981
6997
  "parameterName": "{ refkey }",
6998
+ "parameterTypeTokenRange": {
6999
+ "startIndex": 0,
7000
+ "endIndex": 0
7001
+ },
7002
+ "isOptional": false
7003
+ },
7004
+ {
7005
+ "parameterName": "input",
6982
7006
  "parameterTypeTokenRange": {
6983
7007
  "startIndex": 1,
6984
7008
  "endIndex": 2
@@ -7875,7 +7899,7 @@
7875
7899
  {
7876
7900
  "kind": "Interface",
7877
7901
  "canonicalReference": "@alloy-js/go!StructDeclarationProps:interface",
7878
- "docComment": "/**\n * Properties for creating a struct declaration.\n * This can be used for both named and anonymous structs.\n * For named structs, use `StructTypeDeclarationProps` instead.\n */\n",
7902
+ "docComment": "/**\n * Properties for creating a struct declaration. This can be used for both named and anonymous structs. For named structs, use `StructTypeDeclarationProps` instead.\n */\n",
7879
7903
  "excerptTokens": [
7880
7904
  {
7881
7905
  "kind": "Content",
@@ -7946,7 +7970,7 @@
7946
7970
  {
7947
7971
  "kind": "PropertySignature",
7948
7972
  "canonicalReference": "@alloy-js/go!StructDeclarationProps#singleLine:member",
7949
- "docComment": "/**\n * Whether to render the struct in a single line.\n * This will only compile if `children` is a single line as well.\n * This is not common in Go, so use with caution.\n */\n",
7973
+ "docComment": "/**\n * Whether to render the struct in a single line. This will only compile if `children` is a single line as well. This is not common in Go, so use with caution.\n */\n",
7950
7974
  "excerptTokens": [
7951
7975
  {
7952
7976
  "kind": "Content",
@@ -8487,7 +8511,7 @@
8487
8511
  {
8488
8512
  "kind": "Interface",
8489
8513
  "canonicalReference": "@alloy-js/go!StructTypeDeclarationProps:interface",
8490
- "docComment": "/**\n * Properties for creating a named struct type declaration.\n * This is a combination of `StructDeclarationProps` and `TypeDeclarationProps`.\n */\n",
8514
+ "docComment": "/**\n * Properties for creating a named struct type declaration. This is a combination of `StructDeclarationProps` and `TypeDeclarationProps`.\n */\n",
8491
8515
  "excerptTokens": [
8492
8516
  {
8493
8517
  "kind": "Content",
package/tsconfig.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "emitDeclarationOnly": true,
5
5
  "declaration": true,
6
6
  "outDir": "dist",
7
- "types": ["@alloy-js/core/testing/matchers"],
7
+ "types": ["@alloy-js/core/testing/matchers", "node"],
8
8
  "paths": {
9
9
  "#components/*": ["./src/components/*"]
10
10
  }
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.52.9"
8
+ "packageVersion": "7.58.8"
9
9
  }
10
10
  ]
11
11
  }
package/vitest.config.ts CHANGED
@@ -15,6 +15,7 @@ export default defineConfig({
15
15
  sourcemap: "both",
16
16
  },
17
17
  test: {
18
+ exclude: ["**/dist/**", "**/node_modules/**"],
18
19
  setupFiles: ["./test/vitest.setup.ts"],
19
20
  },
20
21
  plugins: [alloyPlugin()],
@@ -1,25 +0,0 @@
1
- # Reference
2
-
3
- * jsx
4
-
5
- ```tsx
6
- import { Reference } from "@alloy-js/go";
7
-
8
-
9
- <Reference refkey={Refkey} />
10
- ```
11
-
12
- * stc
13
-
14
- ```ts
15
- import { Reference } from "@alloy-js/go/stc";
16
-
17
-
18
- Reference({ refkey: Refkey }).children(children)
19
- ```
20
-
21
- ## Props
22
-
23
- | | | |
24
- | ------ | ------------------------------------- | - |
25
- | refkey | [Refkey](../../../core/types/refkey/) | |