@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,13 +4,13 @@ Common properties for ParameterDescriptor and FunctionTypeParameterDescriptor.
4
4
 
5
5
  ## Members
6
6
 
7
- | | | |
8
- | -------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
9
- | doc | optional[Children](../../../core/types/children/) | Documentation for the parameter. |
10
- | metadata | optional Record\<string, unknown> | Arbitrary metadata for the parameter symbol. |
11
- | name | string \| [Namekey](../../../core/types/namekey/) | The name of the parameter. |
12
- | nullish | optional boolean | Whether the parameter is can be null or undefined. when optional is true, this will be set to true by default, but explicitly setting this to false will override that. |
13
- | optional | optional boolean | Whether the parameter is optional. |
14
- | refkey | optional[Refkey](../../../core/types/refkey/) \| [Refkey](../../../core/types/refkey/)\[] | The refkey for this parameter. |
15
- | rest | optional boolean | Weather the parameter is rest parameter. |
16
- | type | optional[Children](../../../core/types/children/) | The type of the parameter. |
7
+ | | | |
8
+ | -------- | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
9
+ | doc | optional[Children](../../../core/types/children/) | Documentation for the parameter. |
10
+ | metadata | optional Record\<string, unknown> | Arbitrary metadata for the parameter symbol. |
11
+ | name | string \| [Namekey](../../../core/types/namekey/)<[NamekeyOptions](../../../core/types/namekeyoptions/)> | The name of the parameter. |
12
+ | nullish | optional boolean | Whether the parameter is can be null or undefined. when optional is true, this will be set to true by default, but explicitly setting this to false will override that. |
13
+ | optional | optional boolean | Whether the parameter is optional. |
14
+ | refkey | optional[Refkey](../../../core/types/refkey/) \| [Refkey](../../../core/types/refkey/)\[] | The refkey for this parameter. |
15
+ | rest | optional boolean | Weather the parameter is rest parameter. |
16
+ | type | optional[Children](../../../core/types/children/) | The type of the parameter. |
@@ -6,8 +6,9 @@ A lexical scope for TypeScript, which contains declaration spaces for types and
6
6
 
7
7
  Extends [OutputScope](../../../core/types/outputscope/)
8
8
 
9
- | | | |
10
- | ----------------- | ------------------------------------------------------------------------ | - |
11
- | declarationSpaces | string\[] | |
12
- | types | import(“@alloy-js/core”).[OutputSpace](../../../core/types/outputspace/) | |
13
- | values | import(“@alloy-js/core”).[OutputSpace](../../../core/types/outputspace/) | |
9
+ | | | |
10
+ | ----------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
11
+ | declarationSpaces | string\[] | The declaration space keys for this scope type. Subclasses override this to declare which declaration spaces are created on construction (e.g., `["types", "values"]`). |
12
+ | types | [OutputSpace](../../../core/types/outputspace/) | |
13
+ | values | [OutputSpace](../../../core/types/outputspace/) | |
14
+ | Indexer | \[key: number]: () => string | |
@@ -6,9 +6,10 @@ A member scope for TypeScript. Member declarations create symbols in this scope,
6
6
 
7
7
  Extends [TSLexicalScope](../tslexicalscope/)
8
8
 
9
- | | | |
10
- | ----------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
11
- | constructor | (name: string, parentScope: TSOutputScope \| undefined, ownerSymbol: TSOutputSymbol, options: OutputScopeOptions) | Constructs a new instance of the [`TSMemberScope`](TSMemberScope.md) class |
12
- | declarationSpaces | never\[] | |
13
- | isMemberScope | boolean | |
14
- | ownerSymbol | [TSOutputSymbol](../tsoutputsymbol/) | |
9
+ | | | |
10
+ | ----------------- | ------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
11
+ | constructor | (name: string, parentScope: TSOutputScope \| undefined, ownerSymbol: TSOutputSymbol, options?: OutputScopeOptions) | |
12
+ | declarationSpaces | never\[] | The declaration space keys for this scope type. Subclasses override this to declare which declaration spaces are created on construction (e.g., `["types", "values"]`). |
13
+ | isMemberScope | boolean | Check if this is scope is a member scope. Member scopes have no member spaces of their own, but instead put members of their owner symbol in scope. |
14
+ | ownerSymbol | [TSOutputSymbol](../tsoutputsymbol/) | The symbol whose members are in scope. When an owner symbol is present, this scope is considered a member scope, and does not provide its own declaration spaces. |
15
+ | Indexer | \[key: number]: () => string | |
@@ -6,12 +6,13 @@ A lexical scope for TypeScript which represents the top-level scope of a module.
6
6
 
7
7
  Extends [TSLexicalScope](../tslexicalscope/)
8
8
 
9
- | | | |
10
- | --------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
11
- | addImport | (targetSymbol: TSOutputSymbol, targetModule: TSModuleScope, options: AddImportOptions) => TSOutputSymbol | |
12
- | debugInfo | Record\<string, unknown> | |
13
- | exportedSymbols | Map<[Refkey](../../../core/types/refkey/), [TSOutputSymbol](../tsoutputsymbol/)> | |
14
- | getAllSymbols | () => Set\<TSOutputSymbol> | |
15
- | importedModules | [ImportRecords](../importrecords/) | |
16
- | importedSymbols | Map<[TSOutputSymbol](../tsoutputsymbol/), [TSOutputSymbol](../tsoutputsymbol/)> | |
17
- | removeImport | (targetSymbol: TSOutputSymbol, options: AddImportOptions) => void | Decrement the refcount for an import previously registered via addImport. When the last live consumer goes away, the local import symbol is deleted, which removes it from the module’s name spaces and triggers name-conflict-resolver reconciliation. |
9
+ | | | |
10
+ | --------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
11
+ | debugInfo | Record\<string, unknown> | |
12
+ | exportedSymbols | Map<[Refkey](../../../core/types/refkey/), [TSOutputSymbol](../tsoutputsymbol/)> | |
13
+ | importedModules | [ImportRecords](../importrecords/) | |
14
+ | importedSymbols | Map<[TSOutputSymbol](../tsoutputsymbol/), [TSOutputSymbol](../tsoutputsymbol/)> | |
15
+ | addImport | (targetSymbol: TSOutputSymbol, targetModule: TSModuleScope, options?: AddImportOptions) => TSOutputSymbol | |
16
+ | getAllSymbols | () => Set\<TSOutputSymbol> | |
17
+ | removeImport | (targetSymbol: TSOutputSymbol, options?: AddImportOptions) => void | Decrement the refcount for an import previously registered via addImport. When the last live consumer goes away, the local import symbol is deleted, which removes it from the module’s name spaces and triggers name-conflict-resolver reconciliation. |
18
+ | Indexer | \[key: number]: () => string | |
@@ -1,28 +1,61 @@
1
1
  # TSOutputSymbol
2
2
 
3
+ An output symbol is a named entity that can be referenced in your output code.
4
+
3
5
  ## Members
4
6
 
5
7
  Extends [OutputSymbol](../../../core/types/outputsymbol/)
6
8
 
7
- | | | |
8
- | ---------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
9
- | constructor | (name: string \| Namekey, spaces: OutputSpace\[] \| OutputSpace \| undefined, options: CreateTsSymbolOptions) | Constructs a new instance of the [`TSOutputSymbol`](TSOutputSymbol.md) class |
10
- | copy | () => TSOutputSymbol | |
11
- | debugInfo | Record\<string, unknown> | |
12
- | default | boolean | |
13
- | export | boolean | |
14
- | hasInstanceMembers | boolean | |
15
- | instanceMembers | import(“@alloy-js/core”).[OutputMemberSpace](../../../core/types/outputmemberspace/) | |
16
- | isInstanceMemberSymbol | boolean | |
17
- | isPrivateMemberSymbol | boolean | |
18
- | isPublicMemberSymbol | boolean | |
19
- | isStaticMemberSymbol | boolean | |
20
- | isTypeSymbol | boolean | |
21
- | isValueSymbol | boolean | |
22
- | memberSpaces | readonly \[“static”, “instance”, “private-static”, “private-instance”] | |
23
- | ownerSymbol | [TSOutputSymbol](../tsoutputsymbol/) \| undefined | |
24
- | privateInstanceMembers | import(“@alloy-js/core”).[OutputMemberSpace](../../../core/types/outputmemberspace/) | |
25
- | privateStaticMembers | import(“@alloy-js/core”).[OutputMemberSpace](../../../core/types/outputmemberspace/) | |
26
- | scope | [TSOutputScope](../tsoutputscope/) \| undefined | |
27
- | staticMembers | import(“@alloy-js/core”).[OutputMemberSpace](../../../core/types/outputmemberspace/) | |
28
- | tsFlags | [TSSymbolFlags](../../variables/tssymbolflags/) | |
9
+ | | | |
10
+ | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
11
+ | constructor | (name: string \| Namekey\<NamekeyOptions>, spaces: OutputSpace \| OutputSpace\[] \| undefined, options?: CreateTsSymbolOptions) | |
12
+ | memberSpaces | readonly \[“static”, “instance”, “private-static”, “private-instance”] | The member space keys for this symbol type. Subclasses override this to declare which member spaces are created on construction (e.g., `["static", "instance"]`). |
13
+ | debugInfo | Record\<string, unknown> | |
14
+ | default | boolean | |
15
+ | export | boolean | |
16
+ | hasInstanceMembers | boolean | |
17
+ | instanceMembers | [OutputMemberSpace](../../../core/types/outputmemberspace/) | |
18
+ | isInstanceMemberSymbol | boolean | |
19
+ | isPrivateMemberSymbol | boolean | |
20
+ | isPublicMemberSymbol | boolean | |
21
+ | isStaticMemberSymbol | boolean | |
22
+ | isTypeSymbol | boolean | |
23
+ | isValueSymbol | boolean | |
24
+ | ownerSymbol | [TSOutputSymbol](../tsoutputsymbol/) \| undefined | When this is a member symbol, this returns the symbol that this is symbol is a member of. |
25
+ | privateInstanceMembers | [OutputMemberSpace](../../../core/types/outputmemberspace/) | |
26
+ | privateStaticMembers | [OutputMemberSpace](../../../core/types/outputmemberspace/) | |
27
+ | scope | [TSOutputScope](../tsoutputscope/) \| undefined | The scope this symbol is in. When this symbol is a member symbol, this will return undefined. |
28
+ | staticMembers | [OutputMemberSpace](../../../core/types/outputmemberspace/) | |
29
+ | tsFlags | [TSSymbolFlags](../../variables/tssymbolflags/) | |
30
+ | copy | () => TSOutputSymbol | Create a clone of this symbol whose name and flags reactively track the original. |
31
+ | Indexer | \[key: number]: () => string | |
32
+
33
+ ## Remarks
34
+
35
+ This is an abstract base class. Language packages must subclass it and implement the abstract copy() method, which creates a clone that tracks the original’s name and flags.
36
+
37
+ Subtypes typically add language-specific properties (e.g., accessibility, static/abstract flags). Symbols are reactive values, so you can observe changes to their properties in a reactive context.
38
+
39
+ To construct a scopeless external library symbol — one that resolves via refkey but does not appear in any declaration space — pass `undefined` as the `spaces` constructor argument and supply `{ binder }` in `options`. See [OutputSymbolOptions](../../../core/types/outputsymboloptions/) (`binder` option) and [TO\_SYMBOL](../../../core/variables/to_symbol/).
40
+
41
+ ## Example
42
+
43
+ ```ts
44
+ import { createSymbol, OutputSymbol, OutputSpace } from "@alloy-js/core";
45
+
46
+ class MySymbol extends OutputSymbol {
47
+ copy() {
48
+ // getCopyOptions() already includes binder
49
+ const opts = this.getCopyOptions();
50
+ const sym = createSymbol(MySymbol, this.name, undefined, opts);
51
+ this.initializeCopy(sym);
52
+ return sym;
53
+ }
54
+ }
55
+
56
+ // name: string | Namekey; spaces: OutputSpace | OutputSpace[] | undefined; options: OutputSymbolOptions
57
+ const sym = createSymbol(MySymbol, namekey, scope.symbols, { binder });
58
+
59
+ // Construct a scopeless external library symbol (resolves via refkey only):
60
+ const extSym = createSymbol(MySymbol, namekey, undefined, { binder });
61
+ ```
@@ -1,21 +1,32 @@
1
1
  # TSPackageScope
2
2
 
3
+ A container of symbols accessible within some scope in your output code.
4
+
3
5
  ## Members
4
6
 
5
7
  Extends [OutputScope](../../../core/types/outputscope/)
6
8
 
7
- | | | |
8
- | ------------------ | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
9
- | constructor | (name: string, version: string, path: string, options: TSPackageScopeOptions) | Constructs a new instance of the [`TSPackageScope`](TSPackageScope.md) class |
10
- | addDependency | (pkg: TSPackageScope) => void | |
11
- | addExport | (publicPath: string, module: TSModuleScope) => void | |
12
- | addModule | (module: TSModuleScope) => void | |
13
- | builtin | boolean | Whether this is a built-in package provided by the platform. |
14
- | copyTo | () => TSPackageScope | |
15
- | debugInfo | Record\<string, unknown> | |
16
- | dependencies | Set<[TSPackageScope](../tspackagescope/)> | The scopes for the packages this package depends on. |
17
- | exportedSymbols | Map\<string, [TSModuleScope](../tsmodulescope/)> | The symbols exported by this package. They are broken down by which paths they are exported from. It is possible a symbol may be present at multiple paths, in which case emitters can decide which symbol to use based on their own heuristics. |
18
- | findExportedSymbol | (refkey: Refkey) => \[string, TSModuleScope] \| null | |
19
- | modules | Set<[TSModuleScope](../tsmodulescope/)> | All of the modules contained within the package. These modules may or may not be exported. |
20
- | path | string | The path of the root directory of the package. |
21
- | version | string | The version of the this package. |
9
+ | | | |
10
+ | ------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
11
+ | constructor | (name: string, version: string, path: string, options?: TSPackageScopeOptions) | |
12
+ | builtin | boolean | Whether this is a built-in package provided by the platform. |
13
+ | debugInfo | Record\<string, unknown> | |
14
+ | dependencies | Set<[TSPackageScope](../tspackagescope/)> | The scopes for the packages this package depends on. |
15
+ | exportedSymbols | Map\<string, [TSModuleScope](../tsmodulescope/)> | The symbols exported by this package. They are broken down by which paths they are exported from. It is possible a symbol may be present at multiple paths, in which case emitters can decide which symbol to use based on their own heuristics. |
16
+ | modules | Set<[TSModuleScope](../tsmodulescope/)> | All of the modules contained within the package. These modules may or may not be exported. |
17
+ | path | string | The path of the root directory of the package. |
18
+ | version | string | The version of the this package. |
19
+ | addDependency | (pkg: TSPackageScope) => void | |
20
+ | addExport | (publicPath: string, module: TSModuleScope) => void | |
21
+ | addModule | (module: TSModuleScope) => void | |
22
+ | copyTo | () => TSPackageScope | |
23
+ | findExportedSymbol | (refkey: Refkey) => \[string, TSModuleScope] \| null | |
24
+ | Indexer | \[key: number]: () => string | |
25
+
26
+ ## Remarks
27
+
28
+ Scopes form a tree. All scopes except the global scope have a parent scope identified by `parent`. Scopes can have nested scopes which can be accessed using the `children` property. Whether a child scope can be accessed from the parent scope is determined by each language’s scoping rules.
29
+
30
+ This interface is the base implementation of scope. Generally, most languages will have subtypes of this interface that provide additional metadata about the scope. For example, TypeScript scopes need to track whether the scope represents a package, module, class, function, etc.
31
+
32
+ Scopes are reactive values, which allows you to observe changes to the scope within a reactive context.
@@ -1,5 +1,7 @@
1
1
  # TypeDeclarationProps
2
2
 
3
+ The base props for declaration components.
4
+
3
5
  ## Members
4
6
 
5
7
  Extends [CommonDeclarationProps](../commondeclarationprops/)
@@ -4,10 +4,10 @@ Information for a TypeScript generic type parameter.
4
4
 
5
5
  ## Members
6
6
 
7
- | | | |
8
- | -------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------- |
9
- | default | optional[Children](../../../core/types/children/) | The default type of the type parameter. |
10
- | extends | optional[Children](../../../core/types/children/) | The extends constraint for the type parameter. |
11
- | metadata | optional Record\<string, unknown> | Arbitrary metadata for the type parameter symbol. |
12
- | name | string \| [Namekey](../../../core/types/namekey/) | The name of the type parameter. |
13
- | refkey | optional[Refkey](../../../core/types/refkey/) \| [Refkey](../../../core/types/refkey/)\[] | A refkey or array of refkeys for this type parameter. |
7
+ | | | |
8
+ | -------- | -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
9
+ | default | optional[Children](../../../core/types/children/) | The default type of the type parameter. |
10
+ | extends | optional[Children](../../../core/types/children/) | The extends constraint for the type parameter. |
11
+ | metadata | optional Record\<string, unknown> | Arbitrary metadata for the type parameter symbol. |
12
+ | name | string \| [Namekey](../../../core/types/namekey/)<[NamekeyOptions](../../../core/types/namekeyoptions/)> | The name of the type parameter. |
13
+ | refkey | optional[Refkey](../../../core/types/refkey/) \| [Refkey](../../../core/types/refkey/)\[] | A refkey or array of refkeys for this type parameter. |
@@ -4,7 +4,7 @@ Props for type parameters
4
4
 
5
5
  ## Members
6
6
 
7
- | | | |
8
- | ---------- | ------------------------------------------------------------------------------ | ------------ |
9
- | children | optional[Children](../../../core/types/children/) | Jsx Children |
10
- | parameters | optional[TypeParameterDescriptor](../typeparameterdescriptor/)\[] \| string\[] | Parameters |
7
+ | | | |
8
+ | ---------- | ------------------------------------------------------------------------------- | ------------ |
9
+ | children | optional[Children](../../../core/types/children/) | Jsx Children |
10
+ | parameters | optional string\[] \| [TypeParameterDescriptor](../typeparameterdescriptor/)\[] | Parameters |
@@ -25,14 +25,13 @@
25
25
  - [MemberExpressionPartProps](MemberExpressionPartProps.md)
26
26
  - [ModuleExports](ModuleExports.md) — Infers the exported members of a module based on its descriptor.
27
27
  - [ModuleSymbolsDescriptor](ModuleSymbolsDescriptor.md) — Describes the symbols exported by a module.
28
- - [NamedMap](NamedMap.md) — type NamedMap<TDescriptor extends readonly NamedModuleDescriptor[]> = {
28
+ - [NamedMap](NamedMap.md) — 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[] } ?
29
29
  - [NamedModuleDescriptor](NamedModuleDescriptor.md) — Describes the structure of a module descriptor.
30
30
  - [PackageDescriptor](PackageDescriptor.md)
31
31
  - [PackageExports](PackageExports.md)
32
- - [PackageRefkeys](PackageRefkeys.md) — type PackageRefkeys<PD extends Record<string, {
32
+ - [PackageRefkeys](PackageRefkeys.md) — type PackageRefkeys<PD extends Record<string, { default?: string; named?: NamedModuleDescriptor[] }>> = ModuleExports<PD["."]> & { [P in keyof PD as P extends "." ?
33
33
  - [ParameterDescriptor](ParameterDescriptor.md) — Information for a TypeScript function parameter.
34
34
  - [ParameterDescriptorBase](ParameterDescriptorBase.md) — Common properties for ParameterDescriptor and FunctionTypeParameterDescriptor.
35
- - [ReferenceProps](ReferenceProps.md)
36
35
  - [RefOptions](RefOptions.md)
37
36
  - [SourceDirectoryData](SourceDirectoryData.md)
38
37
  - [SourceFileHeaderProps](SourceFileHeaderProps.md)
@@ -40,11 +39,10 @@
40
39
  - [TSMemberScope](TSMemberScope.md) — A member scope for TypeScript.
41
40
  - [TSModuleScope](TSModuleScope.md) — A lexical scope for TypeScript which represents the top-level scope of a module.
42
41
  - [TSOutputScope](TSOutputScope.md) — type TSOutputScope = TSPackageScope | TSModuleScope | TSLexicalScope;
43
- - [TSOutputSymbol](TSOutputSymbol.md) — Extends [OutputSymbol](../../../core/types/outputsymbol/)
44
- - [TSPackageScope](TSPackageScope.md) — Extends [OutputScope](../../../core/types/outputscope/)
42
+ - [TSOutputSymbol](TSOutputSymbol.md) — An output symbol is a named entity that can be referenced in your output code.
43
+ - [TSPackageScope](TSPackageScope.md) — A container of symbols accessible within some scope in your output code.
45
44
  - [TSPackageScopeOptions](TSPackageScopeOptions.md) — Extends [OutputScopeOptions](../../../core/types/outputscopeoptions/)
46
- - [TypeDeclarationProps](TypeDeclarationProps.md) — Extends [CommonDeclarationProps](../commondeclarationprops/)
45
+ - [TypeDeclarationProps](TypeDeclarationProps.md) — The base props for declaration components.
47
46
  - [TypeParameterDescriptor](TypeParameterDescriptor.md) — Information for a TypeScript generic type parameter.
48
47
  - [TypeParametersProps](TypeParametersProps.md) — Props for type parameters
49
- - [TypeRefContextProps](TypeRefContextProps.md)
50
48
  - [TypeScriptElements](TypeScriptElements.md) — type TypeScriptElements = "function" | "parameter" | "class" | "variable" | "enum" | "object-member-data" | "object-memb
@@ -3,17 +3,16 @@
3
3
  A TypeScript function declaration.
4
4
 
5
5
  ```ts
6
- FunctionType: import("@alloy-js/core").Component<FunctionTypeProps> & {
7
- TypeParameters: import("@alloy-js/core").Component<import("./FunctionBase.jsx").TypeParametersProps> & Required<Pick<import("@alloy-js/core").Component<import("./FunctionBase.jsx").TypeParametersProps>, "tag">>;
8
- Parameters: import("@alloy-js/core").Component<import("./FunctionBase.jsx").FunctionTypeParametersProps> & Required<Pick<import("@alloy-js/core").Component<import("./FunctionBase.jsx").FunctionTypeParametersProps>, "tag">>;
9
- }
6
+ const FunctionType: Component<FunctionTypeProps> & { Parameters: Component<FunctionTypeParametersProps> & Required<Pick<Component<FunctionTypeParametersProps>, "tag">>; TypeParameters: Component<TypeParametersProps> & Required<Pick<Component<TypeParametersProps>, "tag">> };
10
7
  ```
11
8
 
12
9
  ## Remarks
13
10
 
14
11
  Providing parameters and type parameters can be accomplished in one of three ways:
15
12
 
16
- 1. As an array of [TypeParameterDescriptor](../../types/typeparameterdescriptor/)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.
13
+ 1. As an array of [TypeParameterDescriptor](../../types/typeparameterdescriptor/)s or [TypeParameterDescriptor](../../types/typeparameterdescriptor/)s.
14
+ 2. As raw content via the `parametersChildren` or `typeParametersChildren` props.
15
+ 3. As a child of this component via the FunctionType.Parameters or FunctionType.TypeParameters components.
17
16
 
18
17
  ## Example
19
18
 
@@ -1,5 +1,5 @@
1
1
  # InterfaceExpression
2
2
 
3
3
  ```ts
4
- InterfaceExpression: import("@alloy-js/core").Component<InterfaceExpressionProps>
4
+ const InterfaceExpression: Component<InterfaceExpressionProps>;
5
5
  ```
@@ -1,5 +1,11 @@
1
1
  # TSSymbolFlags
2
2
 
3
3
  ```ts
4
- enum TSSymbolFlags
4
+ enum TSSymbolFlags {
5
+ None = 0,
6
+ LocalImportSymbol = 1,
7
+ TypeSymbol = 2,
8
+ ParameterSymbol = 4,
9
+ Nullish = 8
10
+ }
5
11
  ```
@@ -1,5 +1,5 @@
1
1
  # TypeDeclaration
2
2
 
3
3
  ```ts
4
- TypeDeclaration: import("@alloy-js/core").Component<TypeDeclarationProps>
4
+ const TypeDeclaration: Component<TypeDeclarationProps>;
5
5
  ```
@@ -1,6 +1,6 @@
1
1
  # typescript — variables
2
2
 
3
3
  - [FunctionType](FunctionType.md) — A TypeScript function declaration.
4
- - [InterfaceExpression](InterfaceExpression.md) — InterfaceExpression: import("@alloy-js/core").Component<InterfaceExpressionProps>
5
- - [TSSymbolFlags](TSSymbolFlags.md) — enum TSSymbolFlags
6
- - [TypeDeclaration](TypeDeclaration.md) — TypeDeclaration: import("@alloy-js/core").Component<TypeDeclarationProps>
4
+ - [InterfaceExpression](InterfaceExpression.md) — const InterfaceExpression: Component<InterfaceExpressionProps>;
5
+ - [TSSymbolFlags](TSSymbolFlags.md) — enum TSSymbolFlags {
6
+ - [TypeDeclaration](TypeDeclaration.md) — const TypeDeclaration: Component<TypeDeclarationProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alloy-js/typescript",
3
- "version": "0.26.0",
3
+ "version": "0.27.0-dev.1",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,24 +30,22 @@
30
30
  "author": "brian.terlson@microsoft.com",
31
31
  "license": "MIT",
32
32
  "dependencies": {
33
+ "@alloy-js/core": "~0.26.0 || >= 0.27.0-dev.1",
33
34
  "change-case": "^5.4.4",
34
- "pathe": "^2.0.3",
35
- "@alloy-js/core": "~0.26.0"
35
+ "pathe": "^2.0.3"
36
36
  },
37
37
  "devDependencies": {
38
- "@microsoft/api-extractor": "~7.58.8",
38
+ "@alloy-js/cli": "~0.26.0 || >= 0.27.0-dev.0",
39
+ "@alloy-js/rollup-plugin": "~0.2.0 || >= 0.2.1-dev.0",
39
40
  "@rollup/plugin-typescript": "^12.3.0",
40
41
  "@types/node": "^26.1.1",
41
42
  "concurrently": "^10.0.3",
42
43
  "typescript": "^7.0.2",
43
- "vitest": "4.1.10",
44
- "@alloy-js/cli": "~0.26.0",
45
- "@alloy-js/rollup-plugin": "~0.2.0"
44
+ "vitest": "4.1.10"
46
45
  },
47
46
  "type": "module",
48
47
  "scripts": {
49
- "generate-docs": "api-extractor run",
50
- "build": "alloy build --with-dev && pnpm run generate-docs",
48
+ "build": "alloy build --with-dev",
51
49
  "clean": "rimraf dist/ .temp/",
52
50
  "test:watch": "vitest -w",
53
51
  "watch": "alloy build --watch",
@@ -1,16 +0,0 @@
1
- {
2
- "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "extends": "../../api-extractor.base.json",
4
-
5
- "messages": {
6
- "extractorMessageReporting": {
7
- // TypeScript 7 emits expando namespace members (e.g. `ArrowFunction.Parameters`)
8
- // as re-exports in the .d.ts (`export { FunctionParameters as Parameters }`).
9
- // The TypeScript engine bundled with API Extractor cannot resolve `@link`
10
- // references to those re-exported members, so silence the false positives.
11
- "ae-unresolved-link": {
12
- "logLevel": "none"
13
- }
14
- }
15
- }
16
- }
@@ -1,7 +0,0 @@
1
- # TypeRefContextProps
2
-
3
- ## Members
4
-
5
- | | | |
6
- | -------- | ----------------------------------------- | -------- |
7
- | children | [Children](../../../core/types/children/) | Children |