@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
@@ -4,34 +4,34 @@
4
4
  import { createValueSymbol } from "@alloy-js/typescript";
5
5
 
6
6
 
7
- function createValueSymbol(name: string | Namekey, options?: CreateTsSymbolOptions): TSOutputSymbol;
7
+ function createValueSymbol(name: string | Namekey<NamekeyOptions>, options?: CreateTsSymbolOptions): TSOutputSymbol;
8
8
  ```
9
9
 
10
10
  ## Parameters
11
11
 
12
- | | | |
13
- | ------- | ------------------------------ | - |
14
- | name | string \| Namekey | |
15
- | options | optional CreateTsSymbolOptions | |
12
+ | | | |
13
+ | ------- | ---------------------------------- | - |
14
+ | name | string \| Namekey\<NamekeyOptions> | |
15
+ | options | optional CreateTsSymbolOptions | |
16
16
 
17
17
  ## Options
18
18
 
19
- | | | |
20
- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
21
- | aliasTarget | optional[OutputSymbol](../../../core/types/outputsymbol/) | The symbol this symbol is an alias for. |
22
- | binder | optional[Binder](../../../core/types/binder/) | The binder instance associated with this symbol. Symbol updates and changes will be reported to this binder. This binder will be able to find this symbol via its refkey and other means. Without a binder, this symbol will be unbound, which means it cannot be referenced by refkey. When constructing an external library symbol, pass `{ binder }` here to ensure the symbol is registered with the binder. See [TO\_SYMBOL](../../../core/variables/to_symbol/) for the full implementation protocol. |
23
- | default | optional boolean | |
24
- | export | optional boolean | |
25
- | hasInstanceMembers | optional boolean | |
26
- | ignoreNameConflict | optional boolean | Whether the name of this symbol should bypass the active name conflict resolution. When true, the name of this symbol will be fixed, though it may conflict with other symbols which are also ignoring name conflict resolution. |
27
- | ignoreNamePolicy | optional boolean | Whether the name of this symbol should bypass the active name policy. When true, the name of this symbol will be fixed, though it may conflict with other symbols which are also ignoring the name policy. |
28
- | lazyMemberInitializer | optional () => void | Provide a function which lazy-initializes members the first time `resolveMemberByName()` is called on this symbol. Called at most once. Only `resolveMemberByName()` triggers this callback — iterating `OutputMemberSpace` directly does not. The callback fires regardless of whether the symbol belongs to any scope, so it is safe to use on scopeless external library symbols. |
29
- | metadata | optional Record\<string, unknown> | Arbitrary metadata about this symbol. |
30
- | namePolicy | optional[NamePolicyGetter](../../../core/types/namepolicygetter/) | When provided, this symbol will be named according to the provided name policy. |
31
- | refkeys | optional[Refkey](../../../core/types/refkey/) \| [Refkey](../../../core/types/refkey/)\[] | The refkey or refkeys associated with this symbol. |
32
- | transient | optional boolean | Whether this symbol is transient. |
33
- | tsFlags | optional[TSSymbolFlags](../../variables/tssymbolflags/) | |
34
- | type | optional[OutputSymbol](../../../core/types/outputsymbol/) \| Ref<[OutputSymbol](../../../core/types/outputsymbol/) \| undefined> | The symbol that provides type information for this symbol. When present, this symbol will not contain its own members, and instead members will be provided by the type. This can be provided a Ref, in which case the type will be the value of that ref. |
19
+ | | | |
20
+ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
21
+ | aliasTarget | optional[OutputSymbol](../../../core/types/outputsymbol/) | The symbol this symbol is an alias for. |
22
+ | binder | optional[Binder](../../../core/types/binder/) | The binder instance associated with this symbol. Symbol updates and changes will be reported to this binder. This binder will be able to find this symbol via its refkey and other means. Without a binder, this symbol will be unbound, which means it cannot be referenced by refkey. When constructing an external library symbol, pass `{ binder }` here to ensure the symbol is registered with the binder. See [TO\_SYMBOL](../../../core/variables/to_symbol/) for the full implementation protocol. |
23
+ | default | optional boolean | |
24
+ | export | optional boolean | |
25
+ | hasInstanceMembers | optional boolean | |
26
+ | ignoreNameConflict | optional boolean | Whether the name of this symbol should bypass the active name conflict resolution. When true, the name of this symbol will be fixed, though it may conflict with other symbols which are also ignoring name conflict resolution. |
27
+ | ignoreNamePolicy | optional boolean | Whether the name of this symbol should bypass the active name policy. When true, the name of this symbol will be fixed, though it may conflict with other symbols which are also ignoring the name policy. |
28
+ | lazyMemberInitializer | optional () => void | Provide a function which lazy-initializes members the first time `resolveMemberByName()` is called on this symbol. Called at most once. Only `resolveMemberByName()` triggers this callback — iterating `OutputMemberSpace` directly does not. The callback fires regardless of whether the symbol belongs to any scope, so it is safe to use on scopeless external library symbols. |
29
+ | metadata | optional Record\<string, unknown> | Arbitrary metadata about this symbol. |
30
+ | namePolicy | optional[NamePolicyGetter](../../../core/types/namepolicygetter/) | When provided, this symbol will be named according to the provided name policy. |
31
+ | refkeys | optional[Refkey](../../../core/types/refkey/) \| [Refkey](../../../core/types/refkey/)\[] | The refkey or refkeys associated with this symbol. |
32
+ | transient | optional boolean | Whether this symbol is transient. |
33
+ | tsFlags | optional[TSSymbolFlags](../../variables/tssymbolflags/) | |
34
+ | type | optional[OutputSymbol](../../../core/types/outputsymbol/) \| Ref<[OutputSymbol](../../../core/types/outputsymbol/) \| undefined, [OutputSymbol](../../../core/types/outputsymbol/) \| undefined> | The symbol that provides type information for this symbol. When present, this symbol will not contain its own members, and instead members will be provided by the type. This can be provided a Ref, in which case the type will be the value of that ref. |
35
35
 
36
36
  ## Returns
37
37
 
@@ -4,7 +4,7 @@
4
4
  import { decl } from "@alloy-js/typescript";
5
5
 
6
6
 
7
- function decl(namekey: Namekey, options?: CreateTsSymbolOptions): import("@alloy-js/core").ComponentCreator<{}>;
7
+ function decl(namekey: Namekey, options?: CreateTsSymbolOptions): ComponentCreator<{}>;
8
8
  ```
9
9
 
10
10
  ## Parameters
@@ -16,23 +16,23 @@ function decl(namekey: Namekey, options?: CreateTsSymbolOptions): import("@alloy
16
16
 
17
17
  ## Options
18
18
 
19
- | | | |
20
- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
21
- | aliasTarget | optional[OutputSymbol](../../../core/types/outputsymbol/) | The symbol this symbol is an alias for. |
22
- | binder | optional[Binder](../../../core/types/binder/) | The binder instance associated with this symbol. Symbol updates and changes will be reported to this binder. This binder will be able to find this symbol via its refkey and other means. Without a binder, this symbol will be unbound, which means it cannot be referenced by refkey. When constructing an external library symbol, pass `{ binder }` here to ensure the symbol is registered with the binder. See [TO\_SYMBOL](../../../core/variables/to_symbol/) for the full implementation protocol. |
23
- | default | optional boolean | |
24
- | export | optional boolean | |
25
- | hasInstanceMembers | optional boolean | |
26
- | ignoreNameConflict | optional boolean | Whether the name of this symbol should bypass the active name conflict resolution. When true, the name of this symbol will be fixed, though it may conflict with other symbols which are also ignoring name conflict resolution. |
27
- | ignoreNamePolicy | optional boolean | Whether the name of this symbol should bypass the active name policy. When true, the name of this symbol will be fixed, though it may conflict with other symbols which are also ignoring the name policy. |
28
- | lazyMemberInitializer | optional () => void | Provide a function which lazy-initializes members the first time `resolveMemberByName()` is called on this symbol. Called at most once. Only `resolveMemberByName()` triggers this callback — iterating `OutputMemberSpace` directly does not. The callback fires regardless of whether the symbol belongs to any scope, so it is safe to use on scopeless external library symbols. |
29
- | metadata | optional Record\<string, unknown> | Arbitrary metadata about this symbol. |
30
- | namePolicy | optional[NamePolicyGetter](../../../core/types/namepolicygetter/) | When provided, this symbol will be named according to the provided name policy. |
31
- | refkeys | optional[Refkey](../../../core/types/refkey/) \| [Refkey](../../../core/types/refkey/)\[] | The refkey or refkeys associated with this symbol. |
32
- | transient | optional boolean | Whether this symbol is transient. |
33
- | tsFlags | optional[TSSymbolFlags](../../variables/tssymbolflags/) | |
34
- | type | optional[OutputSymbol](../../../core/types/outputsymbol/) \| Ref<[OutputSymbol](../../../core/types/outputsymbol/) \| undefined> | The symbol that provides type information for this symbol. When present, this symbol will not contain its own members, and instead members will be provided by the type. This can be provided a Ref, in which case the type will be the value of that ref. |
19
+ | | | |
20
+ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
21
+ | aliasTarget | optional[OutputSymbol](../../../core/types/outputsymbol/) | The symbol this symbol is an alias for. |
22
+ | binder | optional[Binder](../../../core/types/binder/) | The binder instance associated with this symbol. Symbol updates and changes will be reported to this binder. This binder will be able to find this symbol via its refkey and other means. Without a binder, this symbol will be unbound, which means it cannot be referenced by refkey. When constructing an external library symbol, pass `{ binder }` here to ensure the symbol is registered with the binder. See [TO\_SYMBOL](../../../core/variables/to_symbol/) for the full implementation protocol. |
23
+ | default | optional boolean | |
24
+ | export | optional boolean | |
25
+ | hasInstanceMembers | optional boolean | |
26
+ | ignoreNameConflict | optional boolean | Whether the name of this symbol should bypass the active name conflict resolution. When true, the name of this symbol will be fixed, though it may conflict with other symbols which are also ignoring name conflict resolution. |
27
+ | ignoreNamePolicy | optional boolean | Whether the name of this symbol should bypass the active name policy. When true, the name of this symbol will be fixed, though it may conflict with other symbols which are also ignoring the name policy. |
28
+ | lazyMemberInitializer | optional () => void | Provide a function which lazy-initializes members the first time `resolveMemberByName()` is called on this symbol. Called at most once. Only `resolveMemberByName()` triggers this callback — iterating `OutputMemberSpace` directly does not. The callback fires regardless of whether the symbol belongs to any scope, so it is safe to use on scopeless external library symbols. |
29
+ | metadata | optional Record\<string, unknown> | Arbitrary metadata about this symbol. |
30
+ | namePolicy | optional[NamePolicyGetter](../../../core/types/namepolicygetter/) | When provided, this symbol will be named according to the provided name policy. |
31
+ | refkeys | optional[Refkey](../../../core/types/refkey/) \| [Refkey](../../../core/types/refkey/)\[] | The refkey or refkeys associated with this symbol. |
32
+ | transient | optional boolean | Whether this symbol is transient. |
33
+ | tsFlags | optional[TSSymbolFlags](../../variables/tssymbolflags/) | |
34
+ | type | optional[OutputSymbol](../../../core/types/outputsymbol/) \| Ref<[OutputSymbol](../../../core/types/outputsymbol/) \| undefined, [OutputSymbol](../../../core/types/outputsymbol/) \| undefined> | The symbol that provides type information for this symbol. When present, this symbol will not contain its own members, and instead members will be provided by the type. This can be provided a Ref, in which case the type will be the value of that ref. |
35
35
 
36
36
  ## Returns
37
37
 
38
- import(“@alloy-js/core”).[ComponentCreator](../../../core/types/componentcreator/)<{}>
38
+ [ComponentCreator](../../../core/types/componentcreator/)<{}>
@@ -4,39 +4,36 @@
4
4
  import { declMember } from "@alloy-js/typescript";
5
5
 
6
6
 
7
- function declMember(namekey: Namekey, locationOptions?: {
8
- jsPrivate?: boolean;
9
- static?: boolean;
10
- }, options?: CreateTsSymbolOptions): import("@alloy-js/core").ComponentCreator<{}>;
7
+ function declMember(namekey: Namekey, locationOptions?: { jsPrivate?: boolean; static?: boolean }, options?: CreateTsSymbolOptions): ComponentCreator<{}>;
11
8
  ```
12
9
 
13
10
  ## Parameters
14
11
 
15
- | | | |
16
- | --------------- | --------------------------------------------------- | - |
17
- | namekey | Namekey | |
18
- | locationOptions | optional { jsPrivate?: boolean; static?: boolean; } | |
19
- | options | optional CreateTsSymbolOptions | |
12
+ | | | |
13
+ | --------------- | -------------------------------------------------- | - |
14
+ | namekey | Namekey | |
15
+ | locationOptions | optional { jsPrivate?: boolean; static?: boolean } | |
16
+ | options | optional CreateTsSymbolOptions | |
20
17
 
21
18
  ## Options
22
19
 
23
- | | | |
24
- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
25
- | aliasTarget | optional[OutputSymbol](../../../core/types/outputsymbol/) | The symbol this symbol is an alias for. |
26
- | binder | optional[Binder](../../../core/types/binder/) | The binder instance associated with this symbol. Symbol updates and changes will be reported to this binder. This binder will be able to find this symbol via its refkey and other means. Without a binder, this symbol will be unbound, which means it cannot be referenced by refkey. When constructing an external library symbol, pass `{ binder }` here to ensure the symbol is registered with the binder. See [TO\_SYMBOL](../../../core/variables/to_symbol/) for the full implementation protocol. |
27
- | default | optional boolean | |
28
- | export | optional boolean | |
29
- | hasInstanceMembers | optional boolean | |
30
- | ignoreNameConflict | optional boolean | Whether the name of this symbol should bypass the active name conflict resolution. When true, the name of this symbol will be fixed, though it may conflict with other symbols which are also ignoring name conflict resolution. |
31
- | ignoreNamePolicy | optional boolean | Whether the name of this symbol should bypass the active name policy. When true, the name of this symbol will be fixed, though it may conflict with other symbols which are also ignoring the name policy. |
32
- | lazyMemberInitializer | optional () => void | Provide a function which lazy-initializes members the first time `resolveMemberByName()` is called on this symbol. Called at most once. Only `resolveMemberByName()` triggers this callback — iterating `OutputMemberSpace` directly does not. The callback fires regardless of whether the symbol belongs to any scope, so it is safe to use on scopeless external library symbols. |
33
- | metadata | optional Record\<string, unknown> | Arbitrary metadata about this symbol. |
34
- | namePolicy | optional[NamePolicyGetter](../../../core/types/namepolicygetter/) | When provided, this symbol will be named according to the provided name policy. |
35
- | refkeys | optional[Refkey](../../../core/types/refkey/) \| [Refkey](../../../core/types/refkey/)\[] | The refkey or refkeys associated with this symbol. |
36
- | transient | optional boolean | Whether this symbol is transient. |
37
- | tsFlags | optional[TSSymbolFlags](../../variables/tssymbolflags/) | |
38
- | type | optional[OutputSymbol](../../../core/types/outputsymbol/) \| Ref<[OutputSymbol](../../../core/types/outputsymbol/) \| undefined> | The symbol that provides type information for this symbol. When present, this symbol will not contain its own members, and instead members will be provided by the type. This can be provided a Ref, in which case the type will be the value of that ref. |
20
+ | | | |
21
+ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
22
+ | aliasTarget | optional[OutputSymbol](../../../core/types/outputsymbol/) | The symbol this symbol is an alias for. |
23
+ | binder | optional[Binder](../../../core/types/binder/) | The binder instance associated with this symbol. Symbol updates and changes will be reported to this binder. This binder will be able to find this symbol via its refkey and other means. Without a binder, this symbol will be unbound, which means it cannot be referenced by refkey. When constructing an external library symbol, pass `{ binder }` here to ensure the symbol is registered with the binder. See [TO\_SYMBOL](../../../core/variables/to_symbol/) for the full implementation protocol. |
24
+ | default | optional boolean | |
25
+ | export | optional boolean | |
26
+ | hasInstanceMembers | optional boolean | |
27
+ | ignoreNameConflict | optional boolean | Whether the name of this symbol should bypass the active name conflict resolution. When true, the name of this symbol will be fixed, though it may conflict with other symbols which are also ignoring name conflict resolution. |
28
+ | ignoreNamePolicy | optional boolean | Whether the name of this symbol should bypass the active name policy. When true, the name of this symbol will be fixed, though it may conflict with other symbols which are also ignoring the name policy. |
29
+ | lazyMemberInitializer | optional () => void | Provide a function which lazy-initializes members the first time `resolveMemberByName()` is called on this symbol. Called at most once. Only `resolveMemberByName()` triggers this callback — iterating `OutputMemberSpace` directly does not. The callback fires regardless of whether the symbol belongs to any scope, so it is safe to use on scopeless external library symbols. |
30
+ | metadata | optional Record\<string, unknown> | Arbitrary metadata about this symbol. |
31
+ | namePolicy | optional[NamePolicyGetter](../../../core/types/namepolicygetter/) | When provided, this symbol will be named according to the provided name policy. |
32
+ | refkeys | optional[Refkey](../../../core/types/refkey/) \| [Refkey](../../../core/types/refkey/)\[] | The refkey or refkeys associated with this symbol. |
33
+ | transient | optional boolean | Whether this symbol is transient. |
34
+ | tsFlags | optional[TSSymbolFlags](../../variables/tssymbolflags/) | |
35
+ | type | optional[OutputSymbol](../../../core/types/outputsymbol/) \| Ref<[OutputSymbol](../../../core/types/outputsymbol/) \| undefined, [OutputSymbol](../../../core/types/outputsymbol/) \| undefined> | The symbol that provides type information for this symbol. When present, this symbol will not contain its own members, and instead members will be provided by the type. This can be provided a Ref, in which case the type will be the value of that ref. |
39
36
 
40
37
  ## Returns
41
38
 
42
- import(“@alloy-js/core”).[ComponentCreator](../../../core/types/componentcreator/)<{}>
39
+ [ComponentCreator](../../../core/types/componentcreator/)<{}>
@@ -4,7 +4,7 @@
4
4
  import { declType } from "@alloy-js/typescript";
5
5
 
6
6
 
7
- function declType(namekey: Namekey, options?: CreateTsSymbolOptions): import("@alloy-js/core").ComponentCreator<{}>;
7
+ function declType(namekey: Namekey, options?: CreateTsSymbolOptions): ComponentCreator<{}>;
8
8
  ```
9
9
 
10
10
  ## Parameters
@@ -16,23 +16,23 @@ function declType(namekey: Namekey, options?: CreateTsSymbolOptions): import("@a
16
16
 
17
17
  ## Options
18
18
 
19
- | | | |
20
- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
21
- | aliasTarget | optional[OutputSymbol](../../../core/types/outputsymbol/) | The symbol this symbol is an alias for. |
22
- | binder | optional[Binder](../../../core/types/binder/) | The binder instance associated with this symbol. Symbol updates and changes will be reported to this binder. This binder will be able to find this symbol via its refkey and other means. Without a binder, this symbol will be unbound, which means it cannot be referenced by refkey. When constructing an external library symbol, pass `{ binder }` here to ensure the symbol is registered with the binder. See [TO\_SYMBOL](../../../core/variables/to_symbol/) for the full implementation protocol. |
23
- | default | optional boolean | |
24
- | export | optional boolean | |
25
- | hasInstanceMembers | optional boolean | |
26
- | ignoreNameConflict | optional boolean | Whether the name of this symbol should bypass the active name conflict resolution. When true, the name of this symbol will be fixed, though it may conflict with other symbols which are also ignoring name conflict resolution. |
27
- | ignoreNamePolicy | optional boolean | Whether the name of this symbol should bypass the active name policy. When true, the name of this symbol will be fixed, though it may conflict with other symbols which are also ignoring the name policy. |
28
- | lazyMemberInitializer | optional () => void | Provide a function which lazy-initializes members the first time `resolveMemberByName()` is called on this symbol. Called at most once. Only `resolveMemberByName()` triggers this callback — iterating `OutputMemberSpace` directly does not. The callback fires regardless of whether the symbol belongs to any scope, so it is safe to use on scopeless external library symbols. |
29
- | metadata | optional Record\<string, unknown> | Arbitrary metadata about this symbol. |
30
- | namePolicy | optional[NamePolicyGetter](../../../core/types/namepolicygetter/) | When provided, this symbol will be named according to the provided name policy. |
31
- | refkeys | optional[Refkey](../../../core/types/refkey/) \| [Refkey](../../../core/types/refkey/)\[] | The refkey or refkeys associated with this symbol. |
32
- | transient | optional boolean | Whether this symbol is transient. |
33
- | tsFlags | optional[TSSymbolFlags](../../variables/tssymbolflags/) | |
34
- | type | optional[OutputSymbol](../../../core/types/outputsymbol/) \| Ref<[OutputSymbol](../../../core/types/outputsymbol/) \| undefined> | The symbol that provides type information for this symbol. When present, this symbol will not contain its own members, and instead members will be provided by the type. This can be provided a Ref, in which case the type will be the value of that ref. |
19
+ | | | |
20
+ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
21
+ | aliasTarget | optional[OutputSymbol](../../../core/types/outputsymbol/) | The symbol this symbol is an alias for. |
22
+ | binder | optional[Binder](../../../core/types/binder/) | The binder instance associated with this symbol. Symbol updates and changes will be reported to this binder. This binder will be able to find this symbol via its refkey and other means. Without a binder, this symbol will be unbound, which means it cannot be referenced by refkey. When constructing an external library symbol, pass `{ binder }` here to ensure the symbol is registered with the binder. See [TO\_SYMBOL](../../../core/variables/to_symbol/) for the full implementation protocol. |
23
+ | default | optional boolean | |
24
+ | export | optional boolean | |
25
+ | hasInstanceMembers | optional boolean | |
26
+ | ignoreNameConflict | optional boolean | Whether the name of this symbol should bypass the active name conflict resolution. When true, the name of this symbol will be fixed, though it may conflict with other symbols which are also ignoring name conflict resolution. |
27
+ | ignoreNamePolicy | optional boolean | Whether the name of this symbol should bypass the active name policy. When true, the name of this symbol will be fixed, though it may conflict with other symbols which are also ignoring the name policy. |
28
+ | lazyMemberInitializer | optional () => void | Provide a function which lazy-initializes members the first time `resolveMemberByName()` is called on this symbol. Called at most once. Only `resolveMemberByName()` triggers this callback — iterating `OutputMemberSpace` directly does not. The callback fires regardless of whether the symbol belongs to any scope, so it is safe to use on scopeless external library symbols. |
29
+ | metadata | optional Record\<string, unknown> | Arbitrary metadata about this symbol. |
30
+ | namePolicy | optional[NamePolicyGetter](../../../core/types/namepolicygetter/) | When provided, this symbol will be named according to the provided name policy. |
31
+ | refkeys | optional[Refkey](../../../core/types/refkey/) \| [Refkey](../../../core/types/refkey/)\[] | The refkey or refkeys associated with this symbol. |
32
+ | transient | optional boolean | Whether this symbol is transient. |
33
+ | tsFlags | optional[TSSymbolFlags](../../variables/tssymbolflags/) | |
34
+ | type | optional[OutputSymbol](../../../core/types/outputsymbol/) \| Ref<[OutputSymbol](../../../core/types/outputsymbol/) \| undefined, [OutputSymbol](../../../core/types/outputsymbol/) \| undefined> | The symbol that provides type information for this symbol. When present, this symbol will not contain its own members, and instead members will be provided by the type. This can be provided a Ref, in which case the type will be the value of that ref. |
35
35
 
36
36
  ## Returns
37
37
 
38
- import(“@alloy-js/core”).[ComponentCreator](../../../core/types/componentcreator/)<{}>
38
+ [ComponentCreator](../../../core/types/componentcreator/)<{}>
package/docs/api/index.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # @alloy-js/typescript API Reference
2
2
 
3
- - [components](components/index.md) (45 items)
3
+ - [components](components/index.md) (47 items)
4
4
  - [contexts](contexts/index.md) (3 items)
5
5
  - [functions](functions/index.md) (25 items)
6
- - [types](types/index.md) (48 items)
6
+ - [types](types/index.md) (46 items)
7
7
  - [variables](variables/index.md) (4 items)
@@ -2,6 +2,6 @@
2
2
 
3
3
  ## Members
4
4
 
5
- | | | |
6
- | ------- | ------------------------------------------------------------------------- | - |
7
- | Indexer | \[condition: string]: string \| [ExportConditions](../exportconditions/); | |
5
+ | | | |
6
+ | ------- | ------------------------------------------------------------------------ | - |
7
+ | Indexer | \[condition: string]: string \| [ExportConditions](../exportconditions/) | |
@@ -4,7 +4,7 @@ Props for function parameters
4
4
 
5
5
  ## Members
6
6
 
7
- | | | |
8
- | ---------- | ---------------------------------------------------------------------- | ------------ |
9
- | children | optional[Children](../../../core/types/children/) | Jsx Children |
10
- | parameters | optional[ParameterDescriptor](../parameterdescriptor/)\[] \| string\[] | Parameters |
7
+ | | | |
8
+ | ---------- | ----------------------------------------------------------------------- | ------------ |
9
+ | children | optional[Children](../../../core/types/children/) | Jsx Children |
10
+ | parameters | optional string\[] \| [ParameterDescriptor](../parameterdescriptor/)\[] | Parameters |
@@ -4,7 +4,7 @@ Props for a function type(FunctionType or InterfaceMethod)
4
4
 
5
5
  ## Members
6
6
 
7
- | | | |
8
- | ---------- | ---------------------------------------------------------------------- | ------------ |
9
- | children | optional[Children](../../../core/types/children/) | Jsx Children |
10
- | parameters | optional[ParameterDescriptor](../parameterdescriptor/)\[] \| string\[] | Parameters |
7
+ | | | |
8
+ | ---------- | ----------------------------------------------------------------------- | ------------ |
9
+ | children | optional[Children](../../../core/types/children/) | Jsx Children |
10
+ | parameters | optional string\[] \| [ParameterDescriptor](../parameterdescriptor/)\[] | Parameters |
@@ -2,14 +2,14 @@
2
2
 
3
3
  ## Members
4
4
 
5
- | | | |
6
- | -------- | --------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
7
- | args | optional[Children](../../../core/types/children/)\[] \| boolean | Arguments to construct a call expression. |
8
- | await | optional boolean | Whether to await the value that results from this part of the member expression. |
9
- | children | optional[Children](../../../core/types/children/) | The contents of this part. When passed, overrides the other props except nullish. |
10
- | id | optional string \| number | The identifier for this part of the member expression. |
11
- | index | optional number | The index for this part of the member expression. This is used when the part is an array access (i.e. `foo[0]`). |
12
- | nullish | optional boolean | This part is nullish. Subsequent parts use conditional access operators. |
13
- | quoteId | optional boolean | Whether the identifier should be quoted or not. Only needed when providing the `children` prop, otherwise it is determined automatically. |
14
- | refkey | optional[Refkey](../../../core/types/refkey/) | A refkey for a symbol whose name becomes the identifier. |
15
- | symbol | optional[OutputSymbol](../../../core/types/outputsymbol/) | A symbol whose name becomes the identifier. |
5
+ | | | |
6
+ | -------- | ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
7
+ | args | optional boolean \| [Children](../../../core/types/children/)\[] | Arguments to construct a call expression. |
8
+ | await | optional boolean | Whether to await the value that results from this part of the member expression. |
9
+ | children | optional[Children](../../../core/types/children/) | The contents of this part. When passed, overrides the other props except nullish. |
10
+ | id | optional string \| number | The identifier for this part of the member expression. |
11
+ | index | optional number | The index for this part of the member expression. This is used when the part is an array access (i.e. `foo[0]`). |
12
+ | nullish | optional boolean | This part is nullish. Subsequent parts use conditional access operators. |
13
+ | quoteId | optional boolean | Whether the identifier should be quoted or not. Only needed when providing the `children` prop, otherwise it is determined automatically. |
14
+ | refkey | optional[Refkey](../../../core/types/refkey/) | A refkey for a symbol whose name becomes the identifier. |
15
+ | symbol | optional[OutputSymbol](../../../core/types/outputsymbol/) | A symbol whose name becomes the identifier. |
@@ -7,12 +7,5 @@ D - The module descriptor, which may specify a `default` export (as a string) an
7
7
  If `D` includes a `default` property of type `string`, the resulting type will include a `default` property of type `Refkey`. If `D` includes a `named` property (an array of [`NamedModuleDescriptor`](NamedModuleDescriptor.md)), the resulting type will include the mapped named exports as defined by [`NamedMap`](NamedMap.md).
8
8
 
9
9
  ```ts
10
- type ModuleExports<D extends {
11
- default?: string;
12
- named?: NamedModuleDescriptor[];
13
- }> = (D extends {
14
- default: string;
15
- } ? {
16
- default: Refkey;
17
- } : {}) & (D["named"] extends NamedModuleDescriptor[] ? NamedMap<D["named"]> : {});
10
+ type ModuleExports<D extends { default?: string; named?: NamedModuleDescriptor[] }> = (D extends { default: string } ? { default: Refkey } : {}) & (D["named"] extends NamedModuleDescriptor[] ? NamedMap<D["named"]> : {});
18
11
  ```
@@ -1,18 +1,5 @@
1
1
  # NamedMap
2
2
 
3
3
  ```ts
4
- type NamedMap<TDescriptor extends readonly NamedModuleDescriptor[]> = {
5
- [S in Extract<TDescriptor[number], string>]: Refkey;
6
- } & {
7
- [O in Extract<TDescriptor[number], {
8
- name: string;
9
- }> as O["name"]]: Refkey & {
10
- static: O extends {
11
- staticMembers: infer SM extends NamedModuleDescriptor[];
12
- } ? NamedMap<SM> : {};
13
- instance: O extends {
14
- instanceMembers: infer IM extends NamedModuleDescriptor[];
15
- } ? NamedMap<IM> : {};
16
- };
17
- };
4
+ type NamedMap<TDescriptor extends readonly NamedModuleDescriptor[]> = { [S in Extract<TDescriptor[number], string>]: Refkey } & { [O in Extract<TDescriptor[number], { name: string }> as O["name"]]: Refkey & { instance: O extends { instanceMembers: infer IM extends NamedModuleDescriptor[] } ? NamedMap<IM> : {}; static: O extends { staticMembers: infer SM extends NamedModuleDescriptor[] } ? NamedMap<SM> : {} } };
18
5
  ```
@@ -2,12 +2,12 @@
2
2
 
3
3
  Describes the structure of a module descriptor.
4
4
 
5
- A module descriptor can either be a string (representing the module name) or an object with the following properties: - `name`: The name of the module. - `staticMembers`: An optional array of named module descriptors representing static members of the module. - `instanceMembers`: An optional array of named module descriptors representing instance members of the module.
5
+ A module descriptor can either be a string (representing the module name) or an object with the following properties:
6
+
7
+ * `name`: The name of the module.
8
+ * `staticMembers`: An optional array of named module descriptors representing static members of the module.
9
+ * `instanceMembers`: An optional array of named module descriptors representing instance members of the module.
6
10
 
7
11
  ```ts
8
- type NamedModuleDescriptor = string | {
9
- name: string;
10
- staticMembers?: Array<NamedModuleDescriptor>;
11
- instanceMembers?: Array<NamedModuleDescriptor>;
12
- };
12
+ type NamedModuleDescriptor = string | { instanceMembers?: NamedModuleDescriptor[]; name: string; staticMembers?: NamedModuleDescriptor[] };
13
13
  ```
@@ -2,6 +2,6 @@
2
2
 
3
3
  ## Members
4
4
 
5
- | | | |
6
- | ------- | ------------------------------------------------------------------------ | - |
7
- | Indexer | \[path: string]: [ModuleSymbolsDescriptor](../modulesymbolsdescriptor/); | |
5
+ | | | |
6
+ | ------- | ----------------------------------------------------------------------- | - |
7
+ | Indexer | \[path: string]: [ModuleSymbolsDescriptor](../modulesymbolsdescriptor/) | |
@@ -2,6 +2,6 @@
2
2
 
3
3
  ## Members
4
4
 
5
- | | | |
6
- | ------- | --------------------------------------------- | - |
7
- | Indexer | \[key: string]: [ExportPath](../exportpath/); | |
5
+ | | | |
6
+ | ------- | -------------------------------------------- | - |
7
+ | Indexer | \[key: string]: [ExportPath](../exportpath/) | |
@@ -1,10 +1,5 @@
1
1
  # PackageRefkeys
2
2
 
3
3
  ```ts
4
- type PackageRefkeys<PD extends Record<string, {
5
- default?: string;
6
- named?: NamedModuleDescriptor[];
7
- }>> = ModuleExports<PD["."]> & {
8
- [P in keyof PD as P extends "." ? never : P]: ModuleExports<PD[P]>;
9
- };
4
+ type PackageRefkeys<PD extends Record<string, { default?: string; named?: NamedModuleDescriptor[] }>> = ModuleExports<PD["."]> & { [P in keyof PD as P extends "." ? never : P]: ModuleExports<PD[P]> };
10
5
  ```