@alloy-js/typescript 0.26.0 → 0.27.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 (76) hide show
  1. package/docs/api/components/ArrowFunction.md +16 -14
  2. package/docs/api/components/BarrelFile.md +3 -3
  3. package/docs/api/components/BlockScope.md +10 -4
  4. package/docs/api/components/CallSignature.md +11 -11
  5. package/docs/api/components/CaseClause.md +9 -3
  6. package/docs/api/components/CatchClause.md +6 -6
  7. package/docs/api/components/ClassDeclaration.md +34 -5
  8. package/docs/api/components/ClassField.md +16 -17
  9. package/docs/api/components/ClassMember.md +14 -14
  10. package/docs/api/components/ClassMethod.md +24 -25
  11. package/docs/api/components/Declaration.md +19 -15
  12. package/docs/api/components/EnumDeclaration.md +32 -4
  13. package/docs/api/components/EnumMember.md +10 -10
  14. package/docs/api/components/FunctionDeclaration.md +39 -14
  15. package/docs/api/components/FunctionExpression.md +16 -14
  16. package/docs/api/components/InterfaceDeclaration.md +33 -7
  17. package/docs/api/components/InterfaceMember.md +18 -14
  18. package/docs/api/components/InterfaceMethod.md +22 -20
  19. package/docs/api/components/MemberExpression.md +6 -1
  20. package/docs/api/components/ObjectExpression.md +3 -3
  21. package/docs/api/components/ObjectProperty.md +10 -10
  22. package/docs/api/components/PackageDirectory.md +26 -48
  23. package/docs/api/components/PackageJsonFile.md +3 -9
  24. package/docs/api/{types/ReferenceProps.md → components/Reference.md} +20 -2
  25. package/docs/api/components/SourceFile.md +3 -3
  26. package/docs/api/components/TypeRefContext.md +35 -0
  27. package/docs/api/components/VarDeclaration.md +35 -9
  28. package/docs/api/components/ensureTypeRefContext.md +3 -3
  29. package/docs/api/components/index.md +3 -1
  30. package/docs/api/contexts/Package-context.md +1 -1
  31. package/docs/api/contexts/PackageMetadata-context.md +1 -1
  32. package/docs/api/contexts/SourceFile-context.md +1 -1
  33. package/docs/api/contexts/index.md +3 -3
  34. package/docs/api/functions/createInstanceMemberSymbol.md +21 -21
  35. package/docs/api/functions/createMemberSymbol.md +22 -25
  36. package/docs/api/functions/createPackage.md +2 -2
  37. package/docs/api/functions/createPrivateInstanceMemberSymbol.md +21 -21
  38. package/docs/api/functions/createPrivateStaticMemberSymbol.md +21 -21
  39. package/docs/api/functions/createStaticMemberSymbol.md +21 -21
  40. package/docs/api/functions/createTypeAndValueSymbol.md +21 -21
  41. package/docs/api/functions/createTypeSymbol.md +21 -21
  42. package/docs/api/functions/createValueSymbol.md +21 -21
  43. package/docs/api/functions/decl.md +18 -18
  44. package/docs/api/functions/declMember.md +23 -26
  45. package/docs/api/functions/declType.md +18 -18
  46. package/docs/api/index.md +2 -2
  47. package/docs/api/types/ExportConditions.md +3 -3
  48. package/docs/api/types/FunctionParametersProps.md +4 -4
  49. package/docs/api/types/FunctionTypeParametersProps.md +4 -4
  50. package/docs/api/types/MemberExpressionPartProps.md +11 -11
  51. package/docs/api/types/ModuleExports.md +1 -8
  52. package/docs/api/types/NamedMap.md +1 -14
  53. package/docs/api/types/NamedModuleDescriptor.md +6 -6
  54. package/docs/api/types/PackageDescriptor.md +3 -3
  55. package/docs/api/types/PackageExports.md +3 -3
  56. package/docs/api/types/PackageRefkeys.md +1 -6
  57. package/docs/api/types/ParameterDescriptorBase.md +10 -10
  58. package/docs/api/types/TSLexicalScope.md +6 -5
  59. package/docs/api/types/TSMemberScope.md +7 -6
  60. package/docs/api/types/TSModuleScope.md +10 -9
  61. package/docs/api/types/TSOutputSymbol.md +55 -22
  62. package/docs/api/types/TSPackageScope.md +26 -15
  63. package/docs/api/types/TypeDeclarationProps.md +2 -0
  64. package/docs/api/types/TypeParameterDescriptor.md +7 -7
  65. package/docs/api/types/TypeParametersProps.md +4 -4
  66. package/docs/api/types/index.md +5 -7
  67. package/docs/api/variables/FunctionType.md +4 -5
  68. package/docs/api/variables/InterfaceExpression.md +1 -1
  69. package/docs/api/variables/TSSymbolFlags.md +7 -1
  70. package/docs/api/variables/TypeDeclaration.md +1 -1
  71. package/docs/api/variables/index.md +3 -3
  72. package/package.json +7 -9
  73. package/api-extractor.json +0 -16
  74. package/docs/api/types/TypeRefContextProps.md +0 -7
  75. package/temp/api.json +0 -16745
  76. package/tsdoc-metadata.json +0 -11
@@ -10,10 +10,10 @@ A TypeScript arrow function expression.
10
10
 
11
11
  <ArrowFunction
12
12
  async
13
- parameters={ParameterDescriptor[] | string[]}
13
+ parameters={string[] | ParameterDescriptor[]}
14
14
  parametersChildren={Children}
15
15
  returnType={Children}
16
- typeParameters={TypeParameterDescriptor[] | string[]}
16
+ typeParameters={string[] | TypeParameterDescriptor[]}
17
17
  typeParametersChildren={Children}
18
18
  >
19
19
  {children}
@@ -28,31 +28,33 @@ A TypeScript arrow function expression.
28
28
 
29
29
  ArrowFunction({
30
30
  async: boolean,
31
- parameters: ParameterDescriptor[] | string[],
31
+ parameters: string[] | ParameterDescriptor[],
32
32
  parametersChildren: Children,
33
33
  returnType: Children,
34
- typeParameters: TypeParameterDescriptor[] | string[],
34
+ typeParameters: string[] | TypeParameterDescriptor[],
35
35
  typeParametersChildren: Children,
36
36
  }).children(children)
37
37
  ```
38
38
 
39
39
  ## Props
40
40
 
41
- | | | |
42
- | ---------------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
43
- | async | optional boolean | |
44
- | children | optional[Children](../../../core/types/children/) | |
45
- | parameters | optional[ParameterDescriptor](../../types/parameterdescriptor/)\[] \| string\[] | The parameters to the function. Can be an array of strings for parameters which don’t have a type or a default value. Otherwise, it’s an array of [ParameterDescriptor](../../types/parameterdescriptor/)s. |
46
- | parametersChildren | optional[Children](../../../core/types/children/) | Raw content to be used as the parameter list. |
47
- | returnType | optional[Children](../../../core/types/children/) | The return type of the function. |
48
- | typeParameters | optional[TypeParameterDescriptor](../../types/typeparameterdescriptor/)\[] \| string\[] | The type parameters for the function. Can be an array of strings for type parameters which don’t have any constraints or a default type, otherwise it’s an array of [TypeParameterDescriptor](../../types/typeparameterdescriptor/)s. |
49
- | typeParametersChildren | optional[Children](../../../core/types/children/) | Raw content to be used as the type parameter list. |
41
+ | | | |
42
+ | ---------------------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
43
+ | async | optional boolean | |
44
+ | children | optional[Children](../../../core/types/children/) | |
45
+ | parameters | optional string\[] \| [ParameterDescriptor](../../types/parameterdescriptor/)\[] | The parameters to the function. Can be an array of strings for parameters which don’t have a type or a default value. Otherwise, it’s an array of [ParameterDescriptor](../../types/parameterdescriptor/)s. |
46
+ | parametersChildren | optional[Children](../../../core/types/children/) | Raw content to be used as the parameter list. |
47
+ | returnType | optional[Children](../../../core/types/children/) | The return type of the function. |
48
+ | typeParameters | optional string\[] \| [TypeParameterDescriptor](../../types/typeparameterdescriptor/)\[] | The type parameters for the function. Can be an array of strings for type parameters which don’t have any constraints or a default type, otherwise it’s an array of [TypeParameterDescriptor](../../types/typeparameterdescriptor/)s. |
49
+ | typeParametersChildren | optional[Children](../../../core/types/children/) | Raw content to be used as the type parameter list. |
50
50
 
51
51
  ## Remarks
52
52
 
53
53
  Providing parameters and type parameters can be accomplished in one of three ways:
54
54
 
55
- 1. As an array of [ParameterDescriptor](../../types/parameterdescriptor/)s or [TypeParameterDescriptor](../../types/typeparameterdescriptor/)s. 2. As raw content via the `parametersChildren` or `typeParametersChildren` props. 3. As a child of this component via the \[unresolved link] or \[unresolved link] components.
55
+ 1. As an array of [ParameterDescriptor](../../types/parameterdescriptor/)s or [TypeParameterDescriptor](../../types/typeparameterdescriptor/)s.
56
+ 2. As raw content via the `parametersChildren` or `typeParametersChildren` props.
57
+ 3. As a child of this component via the (ArrowFunction:namespace).Parameters or (ArrowFunction:namespace).TypeParameters components.
56
58
 
57
59
  ## Example
58
60
 
@@ -8,7 +8,7 @@ Creates a source file which re-exports the exports in other files and nested bar
8
8
  import { BarrelFile } from "@alloy-js/typescript";
9
9
 
10
10
 
11
- <BarrelFile export={boolean | string} path="string" />
11
+ <BarrelFile export={string | boolean} path="string" />
12
12
  ```
13
13
 
14
14
  * stc
@@ -17,14 +17,14 @@ Creates a source file which re-exports the exports in other files and nested bar
17
17
  import { BarrelFile } from "@alloy-js/typescript/stc";
18
18
 
19
19
 
20
- BarrelFile({ export: boolean | string, path: string }).children(children)
20
+ BarrelFile({ export: string | boolean, path: string }).children(children)
21
21
  ```
22
22
 
23
23
  ## Props
24
24
 
25
25
  | | | |
26
26
  | ------ | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
27
- | export | optional boolean \| string | Whether the source file is exported out of the package. When true, this source file with its source file relative to the project root. Otherwise, it will be exported with the specified path. |
27
+ | export | optional string \| boolean | Whether the source file is exported out of the package. When true, this source file with its source file relative to the project root. Otherwise, it will be exported with the specified path. |
28
28
  | path | optional string | The name of the source file |
29
29
 
30
30
  ## Remarks
@@ -4,6 +4,8 @@ Create a TypeScript block which includes a scope for any nested declarations. Ca
4
4
 
5
5
  ## Overload 1
6
6
 
7
+ Declare a scope by providing an already created scope. The scope is merely exposed via [Scope context](../../../core/contexts/scope-context/).
8
+
7
9
  * jsx
8
10
 
9
11
  ```tsx
@@ -16,7 +18,9 @@ Create a TypeScript block which includes a scope for any nested declarations. Ca
16
18
  newline
17
19
  opener="string"
18
20
  value={OutputScope}
19
- />
21
+ >
22
+ {children}
23
+ </BlockScope>
20
24
  ```
21
25
 
22
26
  * stc
@@ -38,7 +42,6 @@ Create a TypeScript block which includes a scope for any nested declarations. Ca
38
42
 
39
43
  | | | |
40
44
  | -------- | ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
41
- | children | optional[Children](../../../core/types/children/) | |
42
45
  | children | optional[Children](../../../core/types/children/) | The block’s contents |
43
46
  | closer | optional string | The closing punctuation of the block. Defaults to “}”. |
44
47
  | inline | optional boolean | If true the block will not indent the content into new lines |
@@ -48,6 +51,8 @@ Create a TypeScript block which includes a scope for any nested declarations. Ca
48
51
 
49
52
  ## Overload 2
50
53
 
54
+ Create a scope by providing a name and optional metadata.
55
+
51
56
  * jsx
52
57
 
53
58
  ```tsx
@@ -62,7 +67,9 @@ Create a TypeScript block which includes a scope for any nested declarations. Ca
62
67
  newline
63
68
  opener="string"
64
69
  ownerSymbol={OutputSymbol}
65
- />
70
+ >
71
+ {children}
72
+ </BlockScope>
66
73
  ```
67
74
 
68
75
  * stc
@@ -86,7 +93,6 @@ Create a TypeScript block which includes a scope for any nested declarations. Ca
86
93
 
87
94
  | | | |
88
95
  | ----------- | --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
89
- | children | optional[Children](../../../core/types/children/) | |
90
96
  | children | optional[Children](../../../core/types/children/) | The block’s contents |
91
97
  | closer | optional string | The closing punctuation of the block. Defaults to “}”. |
92
98
  | inline | optional boolean | If true the block will not indent the content into new lines |
@@ -11,10 +11,10 @@ Any parameters or type parameters declared in this signature will be placed in t
11
11
 
12
12
 
13
13
  <CallSignature
14
- parameters={ParameterDescriptor[] | string[]}
14
+ parameters={string[] | ParameterDescriptor[]}
15
15
  parametersChildren={Children}
16
16
  returnType={Children}
17
- typeParameters={TypeParameterDescriptor[] | string[]}
17
+ typeParameters={string[] | TypeParameterDescriptor[]}
18
18
  typeParametersChildren={Children}
19
19
  />
20
20
  ```
@@ -26,20 +26,20 @@ Any parameters or type parameters declared in this signature will be placed in t
26
26
 
27
27
 
28
28
  CallSignature({
29
- parameters: ParameterDescriptor[] | string[],
29
+ parameters: string[] | ParameterDescriptor[],
30
30
  parametersChildren: Children,
31
31
  returnType: Children,
32
- typeParameters: TypeParameterDescriptor[] | string[],
32
+ typeParameters: string[] | TypeParameterDescriptor[],
33
33
  typeParametersChildren: Children,
34
34
  }).children(children)
35
35
  ```
36
36
 
37
37
  ## Props
38
38
 
39
- | | | |
40
- | ---------------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
41
- | parameters | optional[ParameterDescriptor](../../types/parameterdescriptor/)\[] \| string\[] | The parameters to the function. Can be an array of strings for parameters which don’t have a type or a default value. Otherwise, it’s an array of [ParameterDescriptor](../../types/parameterdescriptor/)s. |
42
- | parametersChildren | optional[Children](../../../core/types/children/) | Raw content to be used as the parameter list. |
43
- | returnType | optional[Children](../../../core/types/children/) | The return type of the function. |
44
- | typeParameters | optional[TypeParameterDescriptor](../../types/typeparameterdescriptor/)\[] \| string\[] | The type parameters for the function. Can be an array of strings for type parameters which don’t have any constraints or a default type, otherwise it’s an array of [TypeParameterDescriptor](../../types/typeparameterdescriptor/)s. |
45
- | typeParametersChildren | optional[Children](../../../core/types/children/) | Raw content to be used as the type parameter list. |
39
+ | | | |
40
+ | ---------------------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
41
+ | parameters | optional string\[] \| [ParameterDescriptor](../../types/parameterdescriptor/)\[] | The parameters to the function. Can be an array of strings for parameters which don’t have a type or a default value. Otherwise, it’s an array of [ParameterDescriptor](../../types/parameterdescriptor/)s. |
42
+ | parametersChildren | optional[Children](../../../core/types/children/) | Raw content to be used as the parameter list. |
43
+ | returnType | optional[Children](../../../core/types/children/) | The return type of the function. |
44
+ | typeParameters | optional string\[] \| [TypeParameterDescriptor](../../types/typeparameterdescriptor/)\[] | The type parameters for the function. Can be an array of strings for type parameters which don’t have any constraints or a default type, otherwise it’s an array of [TypeParameterDescriptor](../../types/typeparameterdescriptor/)s. |
45
+ | typeParametersChildren | optional[Children](../../../core/types/children/) | Raw content to be used as the type parameter list. |
@@ -10,7 +10,9 @@ A case clause in a switch statement. Provide either an expression or a JS value
10
10
  import { CaseClause } from "@alloy-js/typescript";
11
11
 
12
12
 
13
- <CaseClause block break expression={Children} />
13
+ <CaseClause block break expression={Children}>
14
+ {children}
15
+ </CaseClause>
14
16
  ```
15
17
 
16
18
  * stc
@@ -43,7 +45,9 @@ A case clause in a switch statement. Provide either an expression or a JS value
43
45
  import { CaseClause } from "@alloy-js/typescript";
44
46
 
45
47
 
46
- <CaseClause block break jsValue={unknown} />
48
+ <CaseClause block break jsValue={unknown}>
49
+ {children}
50
+ </CaseClause>
47
51
  ```
48
52
 
49
53
  * stc
@@ -76,7 +80,9 @@ A case clause in a switch statement. Provide either an expression or a JS value
76
80
  import { CaseClause } from "@alloy-js/typescript";
77
81
 
78
82
 
79
- <CaseClause block break default={true} />
83
+ <CaseClause block break default={true}>
84
+ {children}
85
+ </CaseClause>
80
86
  ```
81
87
 
82
88
  * stc
@@ -8,7 +8,7 @@ A catch clause of a try statement.
8
8
  import { CatchClause } from "@alloy-js/typescript";
9
9
 
10
10
 
11
- <CatchClause parameter={ParameterDescriptor | string}>
11
+ <CatchClause parameter={string | ParameterDescriptor}>
12
12
  {children}
13
13
  </CatchClause>
14
14
  ```
@@ -19,15 +19,15 @@ A catch clause of a try statement.
19
19
  import { CatchClause } from "@alloy-js/typescript/stc";
20
20
 
21
21
 
22
- CatchClause({ parameter: ParameterDescriptor | string }).children(children)
22
+ CatchClause({ parameter: string | ParameterDescriptor }).children(children)
23
23
  ```
24
24
 
25
25
  ## Props
26
26
 
27
- | | | |
28
- | --------- | ------------------------------------------------------------------------- | - |
29
- | children | [Children](../../../core/types/children/) | |
30
- | parameter | optional[ParameterDescriptor](../../types/parameterdescriptor/) \| string | |
27
+ | | | |
28
+ | --------- | -------------------------------------------------------------------------- | - |
29
+ | children | [Children](../../../core/types/children/) | |
30
+ | parameter | optional string \| [ParameterDescriptor](../../types/parameterdescriptor/) | |
31
31
 
32
32
  ## Remarks
33
33
 
@@ -2,13 +2,27 @@
2
2
 
3
3
  Create a TypeScript class declaration.
4
4
 
5
+ The base props for declaration components.
6
+
5
7
  * jsx
6
8
 
7
9
  ```tsx
8
10
  import { ClassDeclaration } from "@alloy-js/typescript";
9
11
 
10
12
 
11
- <ClassDeclaration extends={Children} implements={Children[]} />
13
+ <ClassDeclaration
14
+ default
15
+ doc={Children}
16
+ export
17
+ extends={Children}
18
+ implements={Children[]}
19
+ kind={"type" | "value"}
20
+ metadata={Record<string, unknown>}
21
+ name={string | Namekey<NamekeyOptions>}
22
+ refkey={Refkey | Refkey[]}
23
+ >
24
+ {children}
25
+ </ClassDeclaration>
12
26
  ```
13
27
 
14
28
  * stc
@@ -18,17 +32,32 @@ Create a TypeScript class declaration.
18
32
 
19
33
 
20
34
  ClassDeclaration({
35
+ default: boolean,
36
+ doc: Children,
37
+ export: boolean,
21
38
  extends: Children,
22
39
  implements: Children[],
40
+ kind: "type" | "value",
41
+ metadata: Record<string, unknown>,
42
+ name: string | Namekey<NamekeyOptions>,
43
+ refkey: Refkey | Refkey[],
23
44
  }).children(children)
24
45
  ```
25
46
 
26
47
  ## Props
27
48
 
28
- | | | |
29
- | ---------- | ---------------------------------------------------- | - |
30
- | extends | optional[Children](../../../core/types/children/) | |
31
- | implements | optional[Children](../../../core/types/children/)\[] | |
49
+ | | | |
50
+ | ---------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
51
+ | children | optional[Children](../../../core/types/children/) | |
52
+ | default | optional boolean | Whether this is the default export of the module. |
53
+ | doc | optional[Children](../../../core/types/children/) | Documentation for this declaration |
54
+ | export | optional boolean | Whether to export this declaration from the module. |
55
+ | extends | optional[Children](../../../core/types/children/) | |
56
+ | implements | optional[Children](../../../core/types/children/)\[] | |
57
+ | kind | optional “type” \| “value” | Whether this is a declaration of a type (e.g. interface, type alias) or a value (e.g. var, const, let). |
58
+ | metadata | optional Record\<string, unknown> | Arbitrary metadata about this declaration. |
59
+ | name | string \| [Namekey](../../../core/types/namekey/)<[NamekeyOptions](../../../core/types/namekeyoptions/)> | The base name of this declaration. May change depending on naming policy and any conflicts. |
60
+ | refkey | optional[Refkey](../../../core/types/refkey/) \| [Refkey](../../../core/types/refkey/)\[] | The refkey or array of refkeys for this declaration. |
32
61
 
33
62
  ## Remarks
34
63
 
@@ -9,7 +9,7 @@
9
9
  <ClassField
10
10
  doc={Children}
11
11
  jsPrivate
12
- name={string | Namekey}
12
+ name={string | Namekey<NamekeyOptions>}
13
13
  nullish
14
14
  optional
15
15
  private
@@ -32,7 +32,7 @@
32
32
  ClassField({
33
33
  doc: Children,
34
34
  jsPrivate: boolean,
35
- name: string | Namekey,
35
+ name: string | Namekey<NamekeyOptions>,
36
36
  nullish: boolean,
37
37
  optional: boolean,
38
38
  private: boolean,
@@ -46,18 +46,17 @@
46
46
 
47
47
  ## Props
48
48
 
49
- | | | |
50
- | --------- | ------------------------------------------------- | - |
51
- | children | optional[Children](../../../core/types/children/) | |
52
- | children | optional[Children](../../../core/types/children/) | |
53
- | doc | optional[Children](../../../core/types/children/) | |
54
- | jsPrivate | optional boolean | |
55
- | name | string \| [Namekey](../../../core/types/namekey/) | |
56
- | nullish | optional boolean | |
57
- | optional | optional boolean | |
58
- | private | optional boolean | |
59
- | protected | optional boolean | |
60
- | public | optional boolean | |
61
- | refkey | optional[Refkey](../../../core/types/refkey/) | |
62
- | static | optional boolean | |
63
- | type | optional[Children](../../../core/types/children/) | |
49
+ | | | |
50
+ | --------- | -------------------------------------------------------------------------------------------------------- | - |
51
+ | children | optional[Children](../../../core/types/children/) | |
52
+ | doc | optional[Children](../../../core/types/children/) | |
53
+ | jsPrivate | optional boolean | |
54
+ | name | string \| [Namekey](../../../core/types/namekey/)<[NamekeyOptions](../../../core/types/namekeyoptions/)> | |
55
+ | nullish | optional boolean | |
56
+ | optional | optional boolean | |
57
+ | private | optional boolean | |
58
+ | protected | optional boolean | |
59
+ | public | optional boolean | |
60
+ | refkey | optional[Refkey](../../../core/types/refkey/) | |
61
+ | static | optional boolean | |
62
+ | type | optional[Children](../../../core/types/children/) | |
@@ -9,7 +9,7 @@
9
9
  <ClassMember
10
10
  doc={Children}
11
11
  jsPrivate
12
- name={string | Namekey}
12
+ name={string | Namekey<NamekeyOptions>}
13
13
  nullish
14
14
  private
15
15
  protected
@@ -30,7 +30,7 @@
30
30
  ClassMember({
31
31
  doc: Children,
32
32
  jsPrivate: boolean,
33
- name: string | Namekey,
33
+ name: string | Namekey<NamekeyOptions>,
34
34
  nullish: boolean,
35
35
  private: boolean,
36
36
  protected: boolean,
@@ -42,15 +42,15 @@
42
42
 
43
43
  ## Props
44
44
 
45
- | | | |
46
- | --------- | ------------------------------------------------- | - |
47
- | children | optional[Children](../../../core/types/children/) | |
48
- | doc | optional[Children](../../../core/types/children/) | |
49
- | jsPrivate | optional boolean | |
50
- | name | string \| [Namekey](../../../core/types/namekey/) | |
51
- | nullish | optional boolean | |
52
- | private | optional boolean | |
53
- | protected | optional boolean | |
54
- | public | optional boolean | |
55
- | refkey | optional[Refkey](../../../core/types/refkey/) | |
56
- | static | optional boolean | |
45
+ | | | |
46
+ | --------- | -------------------------------------------------------------------------------------------------------- | - |
47
+ | children | optional[Children](../../../core/types/children/) | |
48
+ | doc | optional[Children](../../../core/types/children/) | |
49
+ | jsPrivate | optional boolean | |
50
+ | name | string \| [Namekey](../../../core/types/namekey/)<[NamekeyOptions](../../../core/types/namekeyoptions/)> | |
51
+ | nullish | optional boolean | |
52
+ | private | optional boolean | |
53
+ | protected | optional boolean | |
54
+ | public | optional boolean | |
55
+ | refkey | optional[Refkey](../../../core/types/refkey/) | |
56
+ | static | optional boolean | |
@@ -10,9 +10,9 @@
10
10
  async
11
11
  doc={Children}
12
12
  jsPrivate
13
- name={string | Namekey}
13
+ name={string | Namekey<NamekeyOptions>}
14
14
  nullish
15
- parameters={ParameterDescriptor[] | string[]}
15
+ parameters={string[] | ParameterDescriptor[]}
16
16
  parametersChildren={Children}
17
17
  private
18
18
  protected
@@ -20,7 +20,7 @@
20
20
  refkey={Refkey}
21
21
  returnType={Children}
22
22
  static
23
- typeParameters={TypeParameterDescriptor[] | string[]}
23
+ typeParameters={string[] | TypeParameterDescriptor[]}
24
24
  typeParametersChildren={Children}
25
25
  >
26
26
  {children}
@@ -37,9 +37,9 @@
37
37
  async: boolean,
38
38
  doc: Children,
39
39
  jsPrivate: boolean,
40
- name: string | Namekey,
40
+ name: string | Namekey<NamekeyOptions>,
41
41
  nullish: boolean,
42
- parameters: ParameterDescriptor[] | string[],
42
+ parameters: string[] | ParameterDescriptor[],
43
43
  parametersChildren: Children,
44
44
  private: boolean,
45
45
  protected: boolean,
@@ -47,29 +47,28 @@
47
47
  refkey: Refkey,
48
48
  returnType: Children,
49
49
  static: boolean,
50
- typeParameters: TypeParameterDescriptor[] | string[],
50
+ typeParameters: string[] | TypeParameterDescriptor[],
51
51
  typeParametersChildren: Children,
52
52
  }).children(children)
53
53
  ```
54
54
 
55
55
  ## Props
56
56
 
57
- | | | |
58
- | ---------------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
59
- | async | optional boolean | |
60
- | children | optional[Children](../../../core/types/children/) | |
61
- | children | optional[Children](../../../core/types/children/) | |
62
- | doc | optional[Children](../../../core/types/children/) | |
63
- | jsPrivate | optional boolean | |
64
- | name | string \| [Namekey](../../../core/types/namekey/) | |
65
- | nullish | optional boolean | |
66
- | parameters | optional[ParameterDescriptor](../../types/parameterdescriptor/)\[] \| string\[] | The parameters to the function. Can be an array of strings for parameters which don’t have a type or a default value. Otherwise, it’s an array of [ParameterDescriptor](../../types/parameterdescriptor/)s. |
67
- | parametersChildren | optional[Children](../../../core/types/children/) | Raw content to be used as the parameter list. |
68
- | private | optional boolean | |
69
- | protected | optional boolean | |
70
- | public | optional boolean | |
71
- | refkey | optional[Refkey](../../../core/types/refkey/) | |
72
- | returnType | optional[Children](../../../core/types/children/) | The return type of the function. |
73
- | static | optional boolean | |
74
- | typeParameters | optional[TypeParameterDescriptor](../../types/typeparameterdescriptor/)\[] \| string\[] | The type parameters for the function. Can be an array of strings for type parameters which don’t have any constraints or a default type, otherwise it’s an array of [TypeParameterDescriptor](../../types/typeparameterdescriptor/)s. |
75
- | typeParametersChildren | optional[Children](../../../core/types/children/) | Raw content to be used as the type parameter list. |
57
+ | | | |
58
+ | ---------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
59
+ | async | optional boolean | |
60
+ | children | optional[Children](../../../core/types/children/) | |
61
+ | doc | optional[Children](../../../core/types/children/) | |
62
+ | jsPrivate | optional boolean | |
63
+ | name | string \| [Namekey](../../../core/types/namekey/)<[NamekeyOptions](../../../core/types/namekeyoptions/)> | |
64
+ | nullish | optional boolean | |
65
+ | parameters | optional string\[] \| [ParameterDescriptor](../../types/parameterdescriptor/)\[] | The parameters to the function. Can be an array of strings for parameters which don’t have a type or a default value. Otherwise, it’s an array of [ParameterDescriptor](../../types/parameterdescriptor/)s. |
66
+ | parametersChildren | optional[Children](../../../core/types/children/) | Raw content to be used as the parameter list. |
67
+ | private | optional boolean | |
68
+ | protected | optional boolean | |
69
+ | public | optional boolean | |
70
+ | refkey | optional[Refkey](../../../core/types/refkey/) | |
71
+ | returnType | optional[Children](../../../core/types/children/) | The return type of the function. |
72
+ | static | optional boolean | |
73
+ | typeParameters | optional string\[] \| [TypeParameterDescriptor](../../types/typeparameterdescriptor/)\[] | The type parameters for the function. Can be an array of strings for type parameters which don’t have any constraints or a default type, otherwise it’s an array of [TypeParameterDescriptor](../../types/typeparameterdescriptor/)s. |
74
+ | typeParametersChildren | optional[Children](../../../core/types/children/) | Raw content to be used as the type parameter list. |
@@ -10,7 +10,9 @@ Create a TypeScript declaration. Generally, this component shouldn’t be used d
10
10
  import { Declaration } from "@alloy-js/typescript";
11
11
 
12
12
 
13
- <Declaration doc={Children} symbol={TSOutputSymbol} />
13
+ <Declaration doc={Children} symbol={TSOutputSymbol}>
14
+ {children}
15
+ </Declaration>
14
16
  ```
15
17
 
16
18
  * stc
@@ -44,10 +46,12 @@ Create a TypeScript declaration. Generally, this component shouldn’t be used d
44
46
  export
45
47
  kind={"type" | "value"}
46
48
  metadata={Record<string, unknown>}
47
- name={string | Namekey}
49
+ name={string | Namekey<NamekeyOptions>}
48
50
  nameKind={TypeScriptElements}
49
51
  refkey={Refkey | Refkey[]}
50
- />
52
+ >
53
+ {children}
54
+ </Declaration>
51
55
  ```
52
56
 
53
57
  * stc
@@ -62,7 +66,7 @@ Create a TypeScript declaration. Generally, this component shouldn’t be used d
62
66
  export: boolean,
63
67
  kind: "type" | "value",
64
68
  metadata: Record<string, unknown>,
65
- name: string | Namekey,
69
+ name: string | Namekey<NamekeyOptions>,
66
70
  nameKind: TypeScriptElements,
67
71
  refkey: Refkey | Refkey[],
68
72
  }).children(children)
@@ -70,17 +74,17 @@ Create a TypeScript declaration. Generally, this component shouldn’t be used d
70
74
 
71
75
  ### Props
72
76
 
73
- | | | |
74
- | -------- | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
75
- | children | optional[Children](../../../core/types/children/) | |
76
- | default | optional boolean | Whether this is the default export of the module. |
77
- | doc | optional[Children](../../../core/types/children/) | Documentation for this declaration |
78
- | export | optional boolean | Whether to export this declaration from the module. |
79
- | kind | optional “type” \| “value” | Whether this is a declaration of a type (e.g. interface, type alias) or a value (e.g. var, const, let). |
80
- | metadata | optional Record\<string, unknown> | Arbitrary metadata about this declaration. |
81
- | name | string \| [Namekey](../../../core/types/namekey/) | The base name of this declaration. May change depending on naming policy and any conflicts. |
82
- | nameKind | [TypeScriptElements](../../types/typescriptelements/) | The name policy kind to apply to the declaration. |
83
- | refkey | optional[Refkey](../../../core/types/refkey/) \| [Refkey](../../../core/types/refkey/)\[] | The refkey or array of refkeys for this declaration. |
77
+ | | | |
78
+ | -------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
79
+ | children | optional[Children](../../../core/types/children/) | |
80
+ | default | optional boolean | Whether this is the default export of the module. |
81
+ | doc | optional[Children](../../../core/types/children/) | Documentation for this declaration |
82
+ | export | optional boolean | Whether to export this declaration from the module. |
83
+ | kind | optional “type” \| “value” | Whether this is a declaration of a type (e.g. interface, type alias) or a value (e.g. var, const, let). |
84
+ | metadata | optional Record\<string, unknown> | Arbitrary metadata about this declaration. |
85
+ | name | string \| [Namekey](../../../core/types/namekey/)<[NamekeyOptions](../../../core/types/namekeyoptions/)> | The base name of this declaration. May change depending on naming policy and any conflicts. |
86
+ | nameKind | [TypeScriptElements](../../types/typescriptelements/) | The name policy kind to apply to the declaration. |
87
+ | refkey | optional[Refkey](../../../core/types/refkey/) \| [Refkey](../../../core/types/refkey/)\[] | The refkey or array of refkeys for this declaration. |
84
88
 
85
89
  ## Remarks
86
90