@alloy-js/typescript 0.27.0-dev.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.
- package/docs/api/components/ArrowFunction.md +16 -14
- package/docs/api/components/BarrelFile.md +3 -3
- package/docs/api/components/BlockScope.md +10 -4
- package/docs/api/components/CallSignature.md +11 -11
- package/docs/api/components/CaseClause.md +9 -3
- package/docs/api/components/CatchClause.md +6 -6
- package/docs/api/components/ClassDeclaration.md +34 -5
- package/docs/api/components/ClassField.md +16 -17
- package/docs/api/components/ClassMember.md +14 -14
- package/docs/api/components/ClassMethod.md +24 -25
- package/docs/api/components/Declaration.md +19 -15
- package/docs/api/components/EnumDeclaration.md +32 -4
- package/docs/api/components/EnumMember.md +10 -10
- package/docs/api/components/FunctionDeclaration.md +39 -14
- package/docs/api/components/FunctionExpression.md +16 -14
- package/docs/api/components/InterfaceDeclaration.md +33 -7
- package/docs/api/components/InterfaceMember.md +18 -14
- package/docs/api/components/InterfaceMethod.md +22 -20
- package/docs/api/components/MemberExpression.md +6 -1
- package/docs/api/components/ObjectExpression.md +3 -3
- package/docs/api/components/ObjectProperty.md +10 -10
- package/docs/api/components/PackageDirectory.md +26 -48
- package/docs/api/components/PackageJsonFile.md +3 -9
- package/docs/api/{types/ReferenceProps.md → components/Reference.md} +20 -2
- package/docs/api/components/SourceFile.md +3 -3
- package/docs/api/components/TypeRefContext.md +35 -0
- package/docs/api/components/VarDeclaration.md +35 -9
- package/docs/api/components/ensureTypeRefContext.md +3 -3
- package/docs/api/components/index.md +3 -1
- package/docs/api/contexts/Package-context.md +1 -1
- package/docs/api/contexts/PackageMetadata-context.md +1 -1
- package/docs/api/contexts/SourceFile-context.md +1 -1
- package/docs/api/contexts/index.md +3 -3
- package/docs/api/functions/createInstanceMemberSymbol.md +21 -21
- package/docs/api/functions/createMemberSymbol.md +22 -25
- package/docs/api/functions/createPackage.md +2 -2
- package/docs/api/functions/createPrivateInstanceMemberSymbol.md +21 -21
- package/docs/api/functions/createPrivateStaticMemberSymbol.md +21 -21
- package/docs/api/functions/createStaticMemberSymbol.md +21 -21
- package/docs/api/functions/createTypeAndValueSymbol.md +21 -21
- package/docs/api/functions/createTypeSymbol.md +21 -21
- package/docs/api/functions/createValueSymbol.md +21 -21
- package/docs/api/functions/decl.md +18 -18
- package/docs/api/functions/declMember.md +23 -26
- package/docs/api/functions/declType.md +18 -18
- package/docs/api/index.md +2 -2
- package/docs/api/types/ExportConditions.md +3 -3
- package/docs/api/types/FunctionParametersProps.md +4 -4
- package/docs/api/types/FunctionTypeParametersProps.md +4 -4
- package/docs/api/types/MemberExpressionPartProps.md +11 -11
- package/docs/api/types/ModuleExports.md +1 -8
- package/docs/api/types/NamedMap.md +1 -14
- package/docs/api/types/NamedModuleDescriptor.md +6 -6
- package/docs/api/types/PackageDescriptor.md +3 -3
- package/docs/api/types/PackageExports.md +3 -3
- package/docs/api/types/PackageRefkeys.md +1 -6
- package/docs/api/types/ParameterDescriptorBase.md +10 -10
- package/docs/api/types/TSLexicalScope.md +6 -5
- package/docs/api/types/TSMemberScope.md +7 -6
- package/docs/api/types/TSModuleScope.md +10 -9
- package/docs/api/types/TSOutputSymbol.md +55 -22
- package/docs/api/types/TSPackageScope.md +26 -15
- package/docs/api/types/TypeDeclarationProps.md +2 -0
- package/docs/api/types/TypeParameterDescriptor.md +7 -7
- package/docs/api/types/TypeParametersProps.md +4 -4
- package/docs/api/types/index.md +5 -7
- package/docs/api/variables/FunctionType.md +4 -5
- package/docs/api/variables/InterfaceExpression.md +1 -1
- package/docs/api/variables/TSSymbolFlags.md +7 -1
- package/docs/api/variables/TypeDeclaration.md +1 -1
- package/docs/api/variables/index.md +3 -3
- package/package.json +3 -5
- package/api-extractor.json +0 -16
- package/docs/api/types/TypeRefContextProps.md +0 -7
- package/temp/api.json +0 -16745
- package/tsdoc-metadata.json +0 -11
|
@@ -16,23 +16,12 @@
|
|
|
16
16
|
keywords={string[]}
|
|
17
17
|
license="string"
|
|
18
18
|
name="string"
|
|
19
|
-
packages={[
|
|
20
|
-
ExternalPackage,
|
|
21
|
-
{
|
|
22
|
-
version?: string;
|
|
23
|
-
kind?: "dependencies" | "peerDependencies" | "devDependencies";
|
|
24
|
-
}
|
|
25
|
-
][]}
|
|
19
|
+
packages={[ExternalPackage, { kind?: "dependencies" | "peerDependencies" | "devDependencies"; version?: string }][]}
|
|
26
20
|
path="string"
|
|
27
21
|
peerDependencies={Record<string, string>}
|
|
28
|
-
repository={string | {
|
|
29
|
-
type: string;
|
|
30
|
-
url: string;
|
|
31
|
-
}}
|
|
22
|
+
repository={string | { type: string; url: string }}
|
|
32
23
|
scripts={Record<string, string>}
|
|
33
|
-
tsConfig={{
|
|
34
|
-
outDir?: string;
|
|
35
|
-
}}
|
|
24
|
+
tsConfig={{ outDir?: string }}
|
|
36
25
|
type={"module" | "commonjs"}
|
|
37
26
|
version="string"
|
|
38
27
|
>
|
|
@@ -56,23 +45,12 @@
|
|
|
56
45
|
keywords: string[],
|
|
57
46
|
license: string,
|
|
58
47
|
name: string,
|
|
59
|
-
packages: [
|
|
60
|
-
ExternalPackage,
|
|
61
|
-
{
|
|
62
|
-
version?: string;
|
|
63
|
-
kind?: "dependencies" | "peerDependencies" | "devDependencies";
|
|
64
|
-
}
|
|
65
|
-
][],
|
|
48
|
+
packages: [ExternalPackage, { kind?: "dependencies" | "peerDependencies" | "devDependencies"; version?: string }][],
|
|
66
49
|
path: string,
|
|
67
50
|
peerDependencies: Record<string, string>,
|
|
68
|
-
repository: string | {
|
|
69
|
-
type: string;
|
|
70
|
-
url: string;
|
|
71
|
-
},
|
|
51
|
+
repository: string | { type: string; url: string },
|
|
72
52
|
scripts: Record<string, string>,
|
|
73
|
-
tsConfig: {
|
|
74
|
-
outDir?: string;
|
|
75
|
-
},
|
|
53
|
+
tsConfig: { outDir?: string },
|
|
76
54
|
type: "module" | "commonjs",
|
|
77
55
|
version: string,
|
|
78
56
|
}).children(children)
|
|
@@ -80,23 +58,23 @@
|
|
|
80
58
|
|
|
81
59
|
## Props
|
|
82
60
|
|
|
83
|
-
| |
|
|
84
|
-
| ---------------- |
|
|
85
|
-
| author | optional string
|
|
86
|
-
| children | optional[Children](../../../core/types/children/)
|
|
87
|
-
| dependencies | optional Record\<string, string>
|
|
88
|
-
| description | optional string
|
|
89
|
-
| devDependencies | optional Record\<string, string>
|
|
90
|
-
| exports | optional[PackageExports](../../types/packageexports/) \| [ExportPath](../../types/exportpath/)
|
|
91
|
-
| homepage | optional string
|
|
92
|
-
| keywords | optional string\[]
|
|
93
|
-
| license | optional string
|
|
94
|
-
| name | string
|
|
95
|
-
| packages | optional \[
|
|
96
|
-
| path | optional string
|
|
97
|
-
| peerDependencies | optional Record\<string, string>
|
|
98
|
-
| repository | optional string \| { type: string; url: string
|
|
99
|
-
| scripts | optional Record\<string, string>
|
|
100
|
-
| tsConfig | optional { outDir?: string
|
|
101
|
-
| type | optional “module” \| “commonjs”
|
|
102
|
-
| version | string
|
|
61
|
+
| | | |
|
|
62
|
+
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
63
|
+
| author | optional string | The author of the package |
|
|
64
|
+
| children | optional[Children](../../../core/types/children/) | |
|
|
65
|
+
| dependencies | optional Record\<string, string> | The hard-coded dependencies of the package. References to external packages will add to the dependency list automatically. Only list dependencies here that are not referenced via refkey. |
|
|
66
|
+
| description | optional string | The description of the package |
|
|
67
|
+
| devDependencies | optional Record\<string, string> | The dev dependencies of the package. |
|
|
68
|
+
| exports | optional[PackageExports](../../types/packageexports/) \| [ExportPath](../../types/exportpath/) | The hard-coded exports of the package. |
|
|
69
|
+
| homepage | optional string | The homepage of the package |
|
|
70
|
+
| keywords | optional string\[] | The keywords of the package |
|
|
71
|
+
| license | optional string | The license of the package |
|
|
72
|
+
| name | string | The name of the package |
|
|
73
|
+
| packages | optional \[[ExternalPackage](../../types/externalpackage/), { kind?: “dependencies” \| “peerDependencies” \| “devDependencies”; version?: string }]\[] | Optional configuration values for referenced external packages. By default, external packages are added as regular dependencies. However you can specify `peerDependencies` or `devDependencies` to change this behavior. Version can also be specified here to override the configured package version. |
|
|
74
|
+
| path | optional string | |
|
|
75
|
+
| peerDependencies | optional Record\<string, string> | The peer dependencies of the package. |
|
|
76
|
+
| repository | optional string \| { type: string; url: string } | The repository of the package |
|
|
77
|
+
| scripts | optional Record\<string, string> | The scripts entries of the package. |
|
|
78
|
+
| tsConfig | optional { outDir?: string } | |
|
|
79
|
+
| type | optional “module” \| “commonjs” | Whether this is a commonjs or module. Defaults to module. |
|
|
80
|
+
| version | string | The version of the package |
|
|
@@ -19,10 +19,7 @@ A file containing a package.json that defines a package. When placed inside a [P
|
|
|
19
19
|
license="string"
|
|
20
20
|
name="string"
|
|
21
21
|
peerDependencies={Record<string, string>}
|
|
22
|
-
repository={string | {
|
|
23
|
-
type: string;
|
|
24
|
-
url: string;
|
|
25
|
-
}}
|
|
22
|
+
repository={string | { type: string; url: string }}
|
|
26
23
|
scripts={Record<string, string>}
|
|
27
24
|
type={"module" | "commonjs"}
|
|
28
25
|
version="string"
|
|
@@ -46,10 +43,7 @@ A file containing a package.json that defines a package. When placed inside a [P
|
|
|
46
43
|
license: string,
|
|
47
44
|
name: string,
|
|
48
45
|
peerDependencies: Record<string, string>,
|
|
49
|
-
repository: string | {
|
|
50
|
-
type: string;
|
|
51
|
-
url: string;
|
|
52
|
-
},
|
|
46
|
+
repository: string | { type: string; url: string },
|
|
53
47
|
scripts: Record<string, string>,
|
|
54
48
|
type: "module" | "commonjs",
|
|
55
49
|
version: string,
|
|
@@ -70,7 +64,7 @@ A file containing a package.json that defines a package. When placed inside a [P
|
|
|
70
64
|
| license | optional string | The license of the package |
|
|
71
65
|
| name | string | The name of the package |
|
|
72
66
|
| peerDependencies | optional Record\<string, string> | The peer dependencies of the package. |
|
|
73
|
-
| repository | optional string \| { type: string; url: string
|
|
67
|
+
| repository | optional string \| { type: string; url: string } | The repository of the package |
|
|
74
68
|
| scripts | optional Record\<string, string> | The scripts entries of the package. |
|
|
75
69
|
| type | optional “module” \| “commonjs” | Whether this is a commonjs or module. Defaults to module. |
|
|
76
70
|
| version | string | The version of the package |
|
|
@@ -1,6 +1,24 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Reference
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
* jsx
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { Reference } from "@alloy-js/typescript";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
<Reference refkey={Refkey} type />
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
* stc
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import { Reference } from "@alloy-js/typescript/stc";
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
Reference({ refkey: Refkey, type: boolean }).children(children)
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Props
|
|
4
22
|
|
|
5
23
|
| | | |
|
|
6
24
|
| ------ | ------------------------------------- | --------------------------------------------------------------------------------------------------------- |
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
<SourceFile
|
|
10
|
-
export={
|
|
10
|
+
export={string | boolean}
|
|
11
11
|
header={Children}
|
|
12
12
|
headerComment="string"
|
|
13
13
|
path="string"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
SourceFile({
|
|
26
|
-
export:
|
|
26
|
+
export: string | boolean,
|
|
27
27
|
header: Children,
|
|
28
28
|
headerComment: string,
|
|
29
29
|
path: string,
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
| | | |
|
|
36
36
|
| ------------- | ------------------------------------------------- | - |
|
|
37
37
|
| children | optional[Children](../../../core/types/children/) | |
|
|
38
|
-
| export | optional
|
|
38
|
+
| export | optional string \| boolean | |
|
|
39
39
|
| header | optional[Children](../../../core/types/children/) | |
|
|
40
40
|
| headerComment | optional string | |
|
|
41
41
|
| path | string | |
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# TypeRefContext
|
|
2
|
+
|
|
3
|
+
Set the current context of reference to be type reference.
|
|
4
|
+
|
|
5
|
+
* jsx
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { TypeRefContext } from "@alloy-js/typescript";
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
<TypeRefContext >
|
|
12
|
+
{children}
|
|
13
|
+
</TypeRefContext>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
* stc
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import { TypeRefContext } from "@alloy-js/typescript/stc";
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
TypeRefContext({ }).children(children)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Props
|
|
26
|
+
|
|
27
|
+
| | | |
|
|
28
|
+
| -------- | ----------------------------------------- | -------- |
|
|
29
|
+
| children | [Children](../../../core/types/children/) | Children |
|
|
30
|
+
|
|
31
|
+
## Remarks
|
|
32
|
+
|
|
33
|
+
References used inside the children of this component will be treated as type reference [Reference](../reference/).
|
|
34
|
+
|
|
35
|
+
Prefer using [ensureTypeRefContext](../ensuretyperefcontext/) when wrapping the whole component to reduce tree nodes.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# VarDeclaration
|
|
2
2
|
|
|
3
|
+
The base props for declaration components.
|
|
4
|
+
|
|
3
5
|
* jsx
|
|
4
6
|
|
|
5
7
|
```tsx
|
|
@@ -8,12 +10,21 @@
|
|
|
8
10
|
|
|
9
11
|
<VarDeclaration
|
|
10
12
|
const
|
|
13
|
+
default
|
|
14
|
+
doc={Children}
|
|
15
|
+
export
|
|
11
16
|
initializer={Children}
|
|
17
|
+
kind={"type" | "value"}
|
|
12
18
|
let
|
|
19
|
+
metadata={Record<string, unknown>}
|
|
20
|
+
name={string | Namekey<NamekeyOptions>}
|
|
13
21
|
nullish
|
|
22
|
+
refkey={Refkey | Refkey[]}
|
|
14
23
|
type={Children}
|
|
15
24
|
var
|
|
16
|
-
|
|
25
|
+
>
|
|
26
|
+
{children}
|
|
27
|
+
</VarDeclaration>
|
|
17
28
|
```
|
|
18
29
|
|
|
19
30
|
* stc
|
|
@@ -24,9 +35,16 @@
|
|
|
24
35
|
|
|
25
36
|
VarDeclaration({
|
|
26
37
|
const: boolean,
|
|
38
|
+
default: boolean,
|
|
39
|
+
doc: Children,
|
|
40
|
+
export: boolean,
|
|
27
41
|
initializer: Children,
|
|
42
|
+
kind: "type" | "value",
|
|
28
43
|
let: boolean,
|
|
44
|
+
metadata: Record<string, unknown>,
|
|
45
|
+
name: string | Namekey<NamekeyOptions>,
|
|
29
46
|
nullish: boolean,
|
|
47
|
+
refkey: Refkey | Refkey[],
|
|
30
48
|
type: Children,
|
|
31
49
|
var: boolean,
|
|
32
50
|
}).children(children)
|
|
@@ -34,11 +52,19 @@
|
|
|
34
52
|
|
|
35
53
|
## Props
|
|
36
54
|
|
|
37
|
-
| |
|
|
38
|
-
| ----------- |
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
55
|
+
| | | |
|
|
56
|
+
| ----------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
57
|
+
| children | optional[Children](../../../core/types/children/) | |
|
|
58
|
+
| const | optional boolean | |
|
|
59
|
+
| default | optional boolean | Whether this is the default export of the module. |
|
|
60
|
+
| doc | optional[Children](../../../core/types/children/) | Documentation for this declaration |
|
|
61
|
+
| export | optional boolean | Whether to export this declaration from the module. |
|
|
62
|
+
| initializer | optional[Children](../../../core/types/children/) | |
|
|
63
|
+
| 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). |
|
|
64
|
+
| let | optional boolean | |
|
|
65
|
+
| metadata | optional Record\<string, unknown> | Arbitrary metadata about this declaration. |
|
|
66
|
+
| 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. |
|
|
67
|
+
| nullish | optional boolean | |
|
|
68
|
+
| refkey | optional[Refkey](../../../core/types/refkey/) \| [Refkey](../../../core/types/refkey/)\[] | The refkey or array of refkeys for this declaration. |
|
|
69
|
+
| type | optional[Children](../../../core/types/children/) | |
|
|
70
|
+
| var | optional boolean | |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ensureTypeRefContext
|
|
2
2
|
|
|
3
|
-
Ensure the current component is inside a type ref context. If not it will wrap in a
|
|
3
|
+
Ensure the current component is inside a type ref context. If not it will wrap in a [TypeRefContext](../typerefcontext/) component. If yes it will not add an extra node and return the original component.
|
|
4
4
|
|
|
5
5
|
* jsx
|
|
6
6
|
|
|
@@ -17,12 +17,12 @@ Ensure the current component is inside a type ref context. If not it will wrap i
|
|
|
17
17
|
import { ensureTypeRefContext } from "@alloy-js/typescript/stc";
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
ensureTypeRefContext({
|
|
20
|
+
ensureTypeRefContext({ tag: symbol }).children(children)
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## Props
|
|
24
24
|
|
|
25
25
|
| | | |
|
|
26
26
|
| -------------- | --------------------------- | - |
|
|
27
|
-
| Call signature | (props: TProps) => Children | |
|
|
28
27
|
| tag | optional symbol | |
|
|
28
|
+
| Call signature | (props: TProps) => Children | |
|
|
@@ -38,10 +38,12 @@
|
|
|
38
38
|
- [ObjectSpreadProperty](ObjectSpreadProperty.md) — import { ObjectSpreadProperty } from "@alloy-js/typescript";
|
|
39
39
|
- [PackageDirectory](PackageDirectory.md) — import { PackageDirectory } from "@alloy-js/typescript";
|
|
40
40
|
- [PackageJsonFile](PackageJsonFile.md) — A file containing a package.json that defines a package.
|
|
41
|
+
- [Reference](Reference.md) — import { Reference } from "@alloy-js/typescript";
|
|
41
42
|
- [SingleLineCommentBlock](SingleLineCommentBlock.md) — A single line comment block.
|
|
42
43
|
- [SourceFile](SourceFile.md) — import { SourceFile } from "@alloy-js/typescript";
|
|
43
44
|
- [SwitchStatement](SwitchStatement.md) — A switch statement.
|
|
44
45
|
- [TryStatement](TryStatement.md) — A try statement.
|
|
45
46
|
- [TSConfigJson](TSConfigJson.md) — import { TSConfigJson } from "@alloy-js/typescript";
|
|
47
|
+
- [TypeRefContext](TypeRefContext.md) — Set the current context of reference to be type reference.
|
|
46
48
|
- [ValueExpression](ValueExpression.md) — import { ValueExpression } from "@alloy-js/typescript";
|
|
47
|
-
- [VarDeclaration](VarDeclaration.md) —
|
|
49
|
+
- [VarDeclaration](VarDeclaration.md) — The base props for declaration components.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# typescript — contexts
|
|
2
2
|
|
|
3
|
-
- [Package context](Package-context.md) — const PackageContext: ComponentContext<PackageContext
|
|
4
|
-
- [PackageMetadata context](PackageMetadata-context.md) — const PackageMetadataContext: ComponentContext<PackageMetadataContext
|
|
5
|
-
- [SourceFile context](SourceFile-context.md) — const SourceFileContext: ComponentContext<SourceFileContext
|
|
3
|
+
- [Package context](Package-context.md) — const PackageContext: ComponentContext<PackageContext>;
|
|
4
|
+
- [PackageMetadata context](PackageMetadata-context.md) — const PackageMetadataContext: ComponentContext<PackageMetadataContext>;
|
|
5
|
+
- [SourceFile context](SourceFile-context.md) — const SourceFileContext: ComponentContext<SourceFileContext>;
|
|
@@ -4,34 +4,34 @@
|
|
|
4
4
|
import { createInstanceMemberSymbol } from "@alloy-js/typescript";
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
function createInstanceMemberSymbol(name: string | Namekey
|
|
7
|
+
function createInstanceMemberSymbol(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/)
|
|
22
|
-
| binder | optional[Binder](../../../core/types/binder/)
|
|
23
|
-
| default | optional boolean
|
|
24
|
-
| export | optional boolean
|
|
25
|
-
| hasInstanceMembers | optional boolean
|
|
26
|
-
| ignoreNameConflict | optional boolean
|
|
27
|
-
| ignoreNamePolicy | optional boolean
|
|
28
|
-
| lazyMemberInitializer | optional () => void
|
|
29
|
-
| metadata | optional Record\<string, unknown>
|
|
30
|
-
| namePolicy | optional[NamePolicyGetter](../../../core/types/namepolicygetter/)
|
|
31
|
-
| refkeys | optional[Refkey](../../../core/types/refkey/) \| [Refkey](../../../core/types/refkey/)\[]
|
|
32
|
-
| transient | optional boolean
|
|
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,38 +4,35 @@
|
|
|
4
4
|
import { createMemberSymbol } from "@alloy-js/typescript";
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
function createMemberSymbol(name: string | Namekey
|
|
8
|
-
jsPrivate?: boolean;
|
|
9
|
-
static?: boolean;
|
|
10
|
-
}, options?: CreateTsSymbolOptions): TSOutputSymbol;
|
|
7
|
+
function createMemberSymbol(name: string | Namekey<NamekeyOptions>, locationOptions: { jsPrivate?: boolean; static?: boolean }, options?: CreateTsSymbolOptions): TSOutputSymbol;
|
|
11
8
|
```
|
|
12
9
|
|
|
13
10
|
## Parameters
|
|
14
11
|
|
|
15
|
-
| |
|
|
16
|
-
| --------------- |
|
|
17
|
-
| name | string \| Namekey
|
|
18
|
-
| locationOptions | { jsPrivate?: boolean; static?: boolean
|
|
19
|
-
| options | optional CreateTsSymbolOptions
|
|
12
|
+
| | | |
|
|
13
|
+
| --------------- | ----------------------------------------- | - |
|
|
14
|
+
| name | string \| Namekey\<NamekeyOptions> | |
|
|
15
|
+
| locationOptions | { jsPrivate?: boolean; static?: boolean } | |
|
|
16
|
+
| options | optional CreateTsSymbolOptions | |
|
|
20
17
|
|
|
21
18
|
## Options
|
|
22
19
|
|
|
23
|
-
| |
|
|
24
|
-
| --------------------- |
|
|
25
|
-
| aliasTarget | optional[OutputSymbol](../../../core/types/outputsymbol/)
|
|
26
|
-
| binder | optional[Binder](../../../core/types/binder/)
|
|
27
|
-
| default | optional boolean
|
|
28
|
-
| export | optional boolean
|
|
29
|
-
| hasInstanceMembers | optional boolean
|
|
30
|
-
| ignoreNameConflict | optional boolean
|
|
31
|
-
| ignoreNamePolicy | optional boolean
|
|
32
|
-
| lazyMemberInitializer | optional () => void
|
|
33
|
-
| metadata | optional Record\<string, unknown>
|
|
34
|
-
| namePolicy | optional[NamePolicyGetter](../../../core/types/namepolicygetter/)
|
|
35
|
-
| refkeys | optional[Refkey](../../../core/types/refkey/) \| [Refkey](../../../core/types/refkey/)\[]
|
|
36
|
-
| transient | optional boolean
|
|
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
|
|