@alloy-js/typescript 0.16.0 → 0.18.0-dev.3
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/CHANGELOG.md +13 -0
- package/dist/src/builtins/node.d.ts +11 -42
- package/dist/src/builtins/node.d.ts.map +1 -1
- package/dist/src/builtins/node.js +3 -0
- package/dist/src/components/ArrowFunction.d.ts +1 -1
- package/dist/src/components/ArrowFunction.d.ts.map +1 -1
- package/dist/src/components/CallSignature.d.ts +1 -1
- package/dist/src/components/CallSignature.d.ts.map +1 -1
- package/dist/src/components/ClassDeclaration.d.ts.map +1 -1
- package/dist/src/components/ClassDeclaration.js +5 -7
- package/dist/src/components/Declaration.d.ts.map +1 -1
- package/dist/src/components/Declaration.js +3 -4
- package/dist/src/components/EnumDeclaration.d.ts.map +1 -1
- package/dist/src/components/EnumDeclaration.js +3 -4
- package/dist/src/components/EnumMember.d.ts.map +1 -1
- package/dist/src/components/EnumMember.js +3 -4
- package/dist/src/components/ExportStatement.d.ts +1 -1
- package/dist/src/components/ExportStatement.d.ts.map +1 -1
- package/dist/src/components/FunctionBase.d.ts +1 -1
- package/dist/src/components/FunctionBase.d.ts.map +1 -1
- package/dist/src/components/FunctionBase.js +15 -10
- package/dist/src/components/FunctionDeclaration.d.ts +1 -1
- package/dist/src/components/FunctionDeclaration.d.ts.map +1 -1
- package/dist/src/components/FunctionExpression.d.ts +1 -1
- package/dist/src/components/FunctionExpression.d.ts.map +1 -1
- package/dist/src/components/FunctionType.d.ts +1 -1
- package/dist/src/components/FunctionType.d.ts.map +1 -1
- package/dist/src/components/IfStatement.d.ts +1 -1
- package/dist/src/components/IfStatement.d.ts.map +1 -1
- package/dist/src/components/ImportStatement.d.ts.map +1 -1
- package/dist/src/components/Interface.js +1 -1
- package/dist/src/components/InterfaceMethod.d.ts +1 -2
- package/dist/src/components/InterfaceMethod.d.ts.map +1 -1
- package/dist/src/components/JSDoc.d.ts +1 -1
- package/dist/src/components/JSDoc.d.ts.map +1 -1
- package/dist/src/components/JSDocComment.d.ts +1 -1
- package/dist/src/components/JSDocComment.d.ts.map +1 -1
- package/dist/src/components/JSDocExample.d.ts +1 -1
- package/dist/src/components/JSDocExample.d.ts.map +1 -1
- package/dist/src/components/JSDocParam.d.ts +1 -1
- package/dist/src/components/JSDocParam.d.ts.map +1 -1
- package/dist/src/components/MemberDeclaration.d.ts.map +1 -1
- package/dist/src/components/MemberDeclaration.js +4 -4
- package/dist/src/components/MemberExpression.d.ts +6 -1
- package/dist/src/components/MemberExpression.d.ts.map +1 -1
- package/dist/src/components/MemberExpression.js +38 -14
- package/dist/src/components/NewExpression.d.ts +5 -0
- package/dist/src/components/NewExpression.d.ts.map +1 -0
- package/dist/src/components/NewExpression.js +12 -0
- package/dist/src/components/ObjectExpression.d.ts.map +1 -1
- package/dist/src/components/ObjectExpression.js +17 -18
- package/dist/src/components/PackageDirectory.d.ts.map +1 -1
- package/dist/src/components/PackageDirectory.js +3 -3
- package/dist/src/components/Reference.d.ts.map +1 -1
- package/dist/src/components/Reference.js +5 -1
- package/dist/src/components/SingleLineCommentBlock.d.ts +1 -1
- package/dist/src/components/SingleLineCommentBlock.d.ts.map +1 -1
- package/dist/src/components/SourceFile.d.ts +1 -2
- package/dist/src/components/SourceFile.d.ts.map +1 -1
- package/dist/src/components/SourceFile.js +3 -3
- package/dist/src/components/SwitchStatement.d.ts +1 -1
- package/dist/src/components/SwitchStatement.d.ts.map +1 -1
- package/dist/src/components/TypeRefContext.d.ts +1 -1
- package/dist/src/components/TypeRefContext.d.ts.map +1 -1
- package/dist/src/components/VarDeclaration.d.ts.map +1 -1
- package/dist/src/components/VarDeclaration.js +30 -10
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +1 -0
- package/dist/src/components/stc/index.d.ts +45 -43
- package/dist/src/components/stc/index.d.ts.map +1 -1
- package/dist/src/components/stc/index.js +46 -44
- package/dist/src/create-package.d.ts +63 -19
- package/dist/src/create-package.d.ts.map +1 -1
- package/dist/src/create-package.js +153 -15
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +2 -0
- package/dist/src/parameter-descriptor.d.ts +1 -1
- package/dist/src/parameter-descriptor.d.ts.map +1 -1
- package/dist/src/source-directory-data.d.ts.map +1 -1
- package/dist/src/source-directory-data.js +2 -2
- package/dist/src/symbols/reference.d.ts +2 -1
- package/dist/src/symbols/reference.d.ts.map +1 -1
- package/dist/src/symbols/reference.js +3 -4
- package/dist/src/symbols/scopes.d.ts +1 -4
- package/dist/src/symbols/scopes.d.ts.map +1 -1
- package/dist/src/symbols/ts-member-scope.d.ts +4 -6
- package/dist/src/symbols/ts-member-scope.d.ts.map +1 -1
- package/dist/src/symbols/ts-member-scope.js +8 -10
- package/dist/src/symbols/ts-module-scope.d.ts +8 -11
- package/dist/src/symbols/ts-module-scope.d.ts.map +1 -1
- package/dist/src/symbols/ts-module-scope.js +47 -40
- package/dist/src/symbols/ts-output-symbol.d.ts +23 -16
- package/dist/src/symbols/ts-output-symbol.d.ts.map +1 -1
- package/dist/src/symbols/ts-output-symbol.js +88 -27
- package/dist/src/symbols/ts-package-scope.d.ts +18 -14
- package/dist/src/symbols/ts-package-scope.d.ts.map +1 -1
- package/dist/src/symbols/ts-package-scope.js +78 -27
- package/dist/src/utils.js +1 -1
- package/dist/test/class.test.js +2 -1
- package/dist/test/externals.test.js +87 -2
- package/dist/test/function-declaration.test.js +74 -3
- package/dist/test/member-expression.test.js +108 -2
- package/dist/test/new-expression.test.d.ts +2 -0
- package/dist/test/new-expression.test.d.ts.map +1 -0
- package/dist/test/new-expression.test.js +62 -0
- package/dist/test/values.test.d.ts.map +1 -1
- package/dist/test/values.test.js +48 -1
- package/dist/test/var-declaration.test.d.ts.map +1 -1
- package/dist/test/var-declaration.test.js +145 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +22 -21
- package/src/builtins/node.ts +4 -0
- package/src/components/ArrowFunction.tsx +1 -1
- package/src/components/CallSignature.tsx +1 -1
- package/src/components/ClassDeclaration.tsx +5 -7
- package/src/components/Declaration.tsx +3 -8
- package/src/components/EnumDeclaration.tsx +3 -4
- package/src/components/EnumMember.tsx +3 -4
- package/src/components/FunctionBase.tsx +26 -19
- package/src/components/FunctionDeclaration.tsx +1 -1
- package/src/components/FunctionExpression.tsx +1 -1
- package/src/components/FunctionType.tsx +1 -1
- package/src/components/IfStatement.tsx +1 -2
- package/src/components/ImportStatement.tsx +0 -1
- package/src/components/Interface.tsx +1 -1
- package/src/components/InterfaceMethod.tsx +1 -1
- package/src/components/JSDoc.tsx +1 -2
- package/src/components/JSDocComment.tsx +1 -1
- package/src/components/JSDocExample.tsx +1 -2
- package/src/components/JSDocParam.tsx +1 -2
- package/src/components/MemberDeclaration.tsx +5 -8
- package/src/components/MemberExpression.tsx +67 -15
- package/src/components/NewExpression.tsx +25 -0
- package/src/components/ObjectExpression.tsx +21 -19
- package/src/components/PackageDirectory.tsx +2 -10
- package/src/components/Reference.tsx +4 -2
- package/src/components/SingleLineCommentBlock.tsx +1 -2
- package/src/components/SourceFile.tsx +3 -6
- package/src/components/SwitchStatement.tsx +1 -2
- package/src/components/TypeRefContext.tsx +1 -1
- package/src/components/VarDeclaration.tsx +34 -11
- package/src/components/index.ts +1 -0
- package/src/components/stc/index.ts +46 -44
- package/src/create-package.ts +276 -37
- package/src/index.ts +2 -0
- package/src/parameter-descriptor.ts +1 -1
- package/src/source-directory-data.ts +2 -2
- package/src/symbols/reference.ts +10 -5
- package/src/symbols/scopes.ts +1 -6
- package/src/symbols/ts-member-scope.ts +8 -23
- package/src/symbols/ts-module-scope.ts +58 -62
- package/src/symbols/ts-output-symbol.ts +108 -50
- package/src/symbols/ts-package-scope.ts +71 -53
- package/src/utils.ts +1 -1
- package/temp/api.json +3743 -3667
- package/test/class.test.tsx +2 -1
- package/test/externals.test.tsx +99 -1
- package/test/function-declaration.test.tsx +75 -2
- package/test/member-expression.test.tsx +93 -2
- package/test/new-expression.test.tsx +42 -0
- package/test/values.test.tsx +34 -0
- package/test/var-declaration.test.tsx +101 -1
- package/tsconfig.json +2 -1
- package/tsdoc-metadata.json +1 -1
- package/LICENSE +0 -7
- package/dist/test/vitest.d.js +0 -1
- package/test/vitest.d.ts +0 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog - @alloy-js/typescript
|
|
2
2
|
|
|
3
|
+
## 0.17.0
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
- [#163](https://github.com/alloy-framework/alloy/pull/163) Add `index` property to `MemberExpression.Part` to allow defining array indexes and treat numeric `id` props as array indexes.
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- [#153](https://github.com/alloy-framework/alloy/pull/153) Add support to createPackage for defining instance and static members.
|
|
12
|
+
- [#157](https://github.com/alloy-framework/alloy/pull/157) Variables will now get instance/static symbols based on the type prop or the children. This allows accessing members off of variable declarations when they are typed as a class or interface or assigned an object expression.
|
|
13
|
+
- [#157](https://github.com/alloy-framework/alloy/pull/157) Add new `NewExpression` component which will emit a symbol containing the instantiation of the given class reference.
|
|
14
|
+
|
|
15
|
+
|
|
3
16
|
## 0.16.0
|
|
4
17
|
|
|
5
18
|
### Features
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { SymbolCreator } from "@alloy-js/core";
|
|
2
|
+
export declare const path: {
|
|
2
3
|
default: import("@alloy-js/core").Refkey;
|
|
3
4
|
} & {
|
|
4
5
|
join: import("@alloy-js/core").Refkey;
|
|
@@ -17,45 +18,8 @@ export declare const path: {} & {
|
|
|
17
18
|
sep: import("@alloy-js/core").Refkey;
|
|
18
19
|
toNamespacedPath: import("@alloy-js/core").Refkey;
|
|
19
20
|
win32: import("@alloy-js/core").Refkey;
|
|
20
|
-
} &
|
|
21
|
+
} & {} & {} & SymbolCreator;
|
|
21
22
|
export declare const fs: {
|
|
22
|
-
readonly "./promises": {
|
|
23
|
-
link: import("@alloy-js/core").Refkey;
|
|
24
|
-
access: import("@alloy-js/core").Refkey;
|
|
25
|
-
appendFile: import("@alloy-js/core").Refkey;
|
|
26
|
-
chmod: import("@alloy-js/core").Refkey;
|
|
27
|
-
chown: import("@alloy-js/core").Refkey;
|
|
28
|
-
copyFile: import("@alloy-js/core").Refkey;
|
|
29
|
-
cp: import("@alloy-js/core").Refkey;
|
|
30
|
-
glob: import("@alloy-js/core").Refkey;
|
|
31
|
-
lchmod: import("@alloy-js/core").Refkey;
|
|
32
|
-
lchown: import("@alloy-js/core").Refkey;
|
|
33
|
-
lutimes: import("@alloy-js/core").Refkey;
|
|
34
|
-
lstat: import("@alloy-js/core").Refkey;
|
|
35
|
-
mkdir: import("@alloy-js/core").Refkey;
|
|
36
|
-
mkdtemp: import("@alloy-js/core").Refkey;
|
|
37
|
-
open: import("@alloy-js/core").Refkey;
|
|
38
|
-
opendir: import("@alloy-js/core").Refkey;
|
|
39
|
-
readdir: import("@alloy-js/core").Refkey;
|
|
40
|
-
readFile: import("@alloy-js/core").Refkey;
|
|
41
|
-
realpath: import("@alloy-js/core").Refkey;
|
|
42
|
-
rename: import("@alloy-js/core").Refkey;
|
|
43
|
-
rmdir: import("@alloy-js/core").Refkey;
|
|
44
|
-
rm: import("@alloy-js/core").Refkey;
|
|
45
|
-
stat: import("@alloy-js/core").Refkey;
|
|
46
|
-
statfs: import("@alloy-js/core").Refkey;
|
|
47
|
-
symlink: import("@alloy-js/core").Refkey;
|
|
48
|
-
truncate: import("@alloy-js/core").Refkey;
|
|
49
|
-
unlink: import("@alloy-js/core").Refkey;
|
|
50
|
-
utimes: import("@alloy-js/core").Refkey;
|
|
51
|
-
watch: import("@alloy-js/core").Refkey;
|
|
52
|
-
writeFile: import("@alloy-js/core").Refkey;
|
|
53
|
-
readLink: import("@alloy-js/core").Refkey;
|
|
54
|
-
constants: import("@alloy-js/core").Refkey;
|
|
55
|
-
} & {
|
|
56
|
-
default: import("@alloy-js/core").Refkey;
|
|
57
|
-
};
|
|
58
|
-
} & {
|
|
59
23
|
default: import("@alloy-js/core").Refkey;
|
|
60
24
|
} & {
|
|
61
25
|
link: import("@alloy-js/core").Refkey;
|
|
@@ -150,8 +114,13 @@ export declare const fs: {
|
|
|
150
114
|
writeFileSync: import("@alloy-js/core").Refkey;
|
|
151
115
|
writeSync: import("@alloy-js/core").Refkey;
|
|
152
116
|
writevSync: import("@alloy-js/core").Refkey;
|
|
153
|
-
} &
|
|
154
|
-
|
|
117
|
+
} & {} & {
|
|
118
|
+
readonly "./promises": import("../create-package.js").ModuleExports<{
|
|
119
|
+
readonly default: "fs";
|
|
120
|
+
readonly named: ["access", "appendFile", "chmod", "chown", "copyFile", "cp", "glob", "lchmod", "lchown", "lutimes", "link", "lstat", "mkdir", "mkdtemp", "open", "opendir", "readdir", "readFile", "readLink", "realpath", "rename", "rmdir", "rm", "stat", "statfs", "symlink", "truncate", "unlink", "utimes", "watch", "writeFile", "constants"];
|
|
121
|
+
}>;
|
|
122
|
+
} & SymbolCreator;
|
|
123
|
+
export declare const util: {
|
|
155
124
|
default: import("@alloy-js/core").Refkey;
|
|
156
125
|
} & {
|
|
157
126
|
format: import("@alloy-js/core").Refkey;
|
|
@@ -179,5 +148,5 @@ export declare const util: {} & {
|
|
|
179
148
|
transferableAbortSignal: import("@alloy-js/core").Refkey;
|
|
180
149
|
aborted: import("@alloy-js/core").Refkey;
|
|
181
150
|
types: import("@alloy-js/core").Refkey;
|
|
182
|
-
} &
|
|
151
|
+
} & {} & {} & SymbolCreator;
|
|
183
152
|
//# sourceMappingURL=node.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/builtins/node.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/builtins/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAM/C,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;2BA2Bf,CAAC;AAEH,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqJb,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAoCf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrowFunction.d.ts","sourceRoot":"","sources":["../../../src/components/ArrowFunction.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ArrowFunction.d.ts","sourceRoot":"","sources":["../../../src/components/ArrowFunction.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,QAAQ,EACd,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAiB,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AASxE,MAAM,WAAW,kBAAmB,SAAQ,kBAAkB;IAC5D,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,YAiCtD;yBAjCe,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CallSignature.d.ts","sourceRoot":"","sources":["../../../src/components/CallSignature.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"CallSignature.d.ts","sourceRoot":"","sources":["../../../src/components/CallSignature.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACxB,MAAM,4BAA4B,CAAC;AAGpC,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,UAAU,CAAC,EAAE,mBAAmB,EAAE,GAAG,MAAM,EAAE,CAAC;IAE9C;;OAEG;IACH,kBAAkB,CAAC,EAAE,QAAQ,CAAC;IAE9B;;;;OAIG;IACH,cAAc,CAAC,EAAE,uBAAuB,EAAE,GAAG,MAAM,EAAE,CAAC;IAEtD;;OAEG;IACH,sBAAsB,CAAC,EAAE,QAAQ,CAAC;IAElC;;OAEG;IACH,UAAU,CAAC,EAAE,QAAQ,CAAC;CACvB;AACD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,YAqBtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClassDeclaration.d.ts","sourceRoot":"","sources":["../../../src/components/ClassDeclaration.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAKR,MAAM,EAKP,MAAM,gBAAgB,CAAC;AAOxB,OAAO,EAAiB,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAe,MAAM,mBAAmB,CAAC;AAMtE,MAAM,WAAW,qBAAsB,SAAQ,oBAAoB;IACjE,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"ClassDeclaration.d.ts","sourceRoot":"","sources":["../../../src/components/ClassDeclaration.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAKR,MAAM,EAKP,MAAM,gBAAgB,CAAC;AAOxB,OAAO,EAAiB,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAe,MAAM,mBAAmB,CAAC;AAMtE,MAAM,WAAW,qBAAsB,SAAQ,oBAAoB;IACjE,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,YA4B5D;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,YAsDlD;AAED,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACvD,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,YAiBhD;AAED,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB,EAAE,kBAAkB;IAC5E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,YAwBlD"}
|
|
@@ -2,7 +2,7 @@ import { memo as _$memo, createComponent as _$createComponent, createIntrinsic a
|
|
|
2
2
|
import { Block, MemberDeclaration, Name, OutputSymbolFlags, Prose, Scope, Show, splitProps, useMemberScope } from "@alloy-js/core";
|
|
3
3
|
import { usePrivateScope } from "../context/private-scope.js";
|
|
4
4
|
import { useTSNamePolicy } from "../name-policy.js";
|
|
5
|
-
import {
|
|
5
|
+
import { TSOutputSymbol, TSSymbolFlags } from "../symbols/ts-output-symbol.js";
|
|
6
6
|
import { getCallSignatureProps } from "../utils.js";
|
|
7
7
|
import { CallSignature } from "./CallSignature.js";
|
|
8
8
|
import { Declaration } from "./Declaration.js";
|
|
@@ -46,9 +46,8 @@ import { TypeRefContext } from "./TypeRefContext.js";
|
|
|
46
46
|
export function ClassDeclaration(props) {
|
|
47
47
|
const namePolicy = useTSNamePolicy();
|
|
48
48
|
const extendsPart = props.extends && [" extends ", _$memo(() => props.extends)];
|
|
49
|
-
const sym =
|
|
50
|
-
|
|
51
|
-
refkey: props.refkey,
|
|
49
|
+
const sym = new TSOutputSymbol(namePolicy.getName(props.name, "class"), {
|
|
50
|
+
refkeys: props.refkey,
|
|
52
51
|
export: props.export,
|
|
53
52
|
default: props.default,
|
|
54
53
|
flags: (props.flags ?? OutputSymbolFlags.None) | (OutputSymbolFlags.MemberContainer | OutputSymbolFlags.StaticMemberContainer),
|
|
@@ -104,10 +103,9 @@ export function ClassMember(props) {
|
|
|
104
103
|
if (props.nullish) {
|
|
105
104
|
tsFlags |= TSSymbolFlags.Nullish;
|
|
106
105
|
}
|
|
107
|
-
const sym =
|
|
108
|
-
name,
|
|
106
|
+
const sym = new TSOutputSymbol(name, {
|
|
109
107
|
scope,
|
|
110
|
-
|
|
108
|
+
refkeys: props.refkey,
|
|
111
109
|
flags,
|
|
112
110
|
tsFlags
|
|
113
111
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Declaration.d.ts","sourceRoot":"","sources":["../../../src/components/Declaration.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAGR,iBAAiB,EACjB,MAAM,EACP,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAmB,MAAM,mBAAmB,CAAC;AACxE,OAAO,
|
|
1
|
+
{"version":3,"file":"Declaration.d.ts","sourceRoot":"","sources":["../../../src/components/Declaration.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAGR,iBAAiB,EACjB,MAAM,EACP,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAmB,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAiB,MAAM,qBAAqB,CAAC;AAYpE,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE3B;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAE1B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEnC;;OAEG;IACH,GAAG,CAAC,EAAE,QAAQ,CAAC;CAChB;AAED,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,MAAM,CAAC;IAC1E;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAE9B;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,YAwDlD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createComponent as _$createComponent, memo as _$memo } from "@alloy-js/core/jsx-runtime";
|
|
2
2
|
import { Declaration as CoreDeclaration, MemberScope, OutputSymbolFlags } from "@alloy-js/core";
|
|
3
3
|
import { useTSNamePolicy } from "../name-policy.js";
|
|
4
|
-
import {
|
|
4
|
+
import { TSOutputSymbol, TSSymbolFlags } from "../symbols/index.js";
|
|
5
5
|
|
|
6
6
|
// imports for documentation
|
|
7
7
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -35,9 +35,8 @@ export function Declaration(props) {
|
|
|
35
35
|
if (props.kind && props.kind === "type") {
|
|
36
36
|
tsFlags |= TSSymbolFlags.TypeSymbol;
|
|
37
37
|
}
|
|
38
|
-
sym =
|
|
39
|
-
|
|
40
|
-
refkey: props.refkey,
|
|
38
|
+
sym = new TSOutputSymbol(namePolicy.getName(props.name, props.nameKind), {
|
|
39
|
+
refkeys: props.refkey,
|
|
41
40
|
export: props.export,
|
|
42
41
|
default: props.default,
|
|
43
42
|
flags: props.flags,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnumDeclaration.d.ts","sourceRoot":"","sources":["../../../src/components/EnumDeclaration.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAGxD,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IAChE;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;CAC3C;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"EnumDeclaration.d.ts","sourceRoot":"","sources":["../../../src/components/EnumDeclaration.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAGxD,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IAChE;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;CAC3C;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,qCAwC1D"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createComponent as _$createComponent, createIntrinsic as _$createIntrinsic, memo as _$memo } from "@alloy-js/core/jsx-runtime";
|
|
2
2
|
import { Block, computed, Declaration as CoreDeclaration, For, MemberScope, Name, OutputSymbolFlags, Show, useBinder } from "@alloy-js/core";
|
|
3
3
|
import { useTSNamePolicy } from "../name-policy.js";
|
|
4
|
-
import {
|
|
4
|
+
import { TSOutputSymbol, useTSScope } from "../symbols/index.js";
|
|
5
5
|
import { EnumMember } from "./EnumMember.js";
|
|
6
6
|
import { JSDoc } from "./JSDoc.js";
|
|
7
7
|
/**
|
|
@@ -11,11 +11,10 @@ export function EnumDeclaration(props) {
|
|
|
11
11
|
const name = useTSNamePolicy().getName(props.name, "enum");
|
|
12
12
|
const binder = useBinder();
|
|
13
13
|
const scope = useTSScope();
|
|
14
|
-
const sym =
|
|
14
|
+
const sym = new TSOutputSymbol(name, {
|
|
15
15
|
binder,
|
|
16
16
|
scope,
|
|
17
|
-
|
|
18
|
-
refkey: props.refkey,
|
|
17
|
+
refkeys: props.refkey,
|
|
19
18
|
default: props.default,
|
|
20
19
|
export: props.export,
|
|
21
20
|
flags: OutputSymbolFlags.StaticMemberContainer,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnumMember.d.ts","sourceRoot":"","sources":["../../../src/components/EnumMember.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAqB,MAAM,EAAQ,MAAM,gBAAgB,CAAC;AAO3E,MAAM,WAAW,eAAe;IAC9B;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAC;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEnC;;OAEG;IACH,GAAG,CAAC,EAAE,QAAQ,CAAC;CAChB;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"EnumMember.d.ts","sourceRoot":"","sources":["../../../src/components/EnumMember.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAqB,MAAM,EAAQ,MAAM,gBAAgB,CAAC;AAO3E,MAAM,WAAW,eAAe;IAC9B;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAC;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEnC;;OAEG;IACH,GAAG,CAAC,EAAE,QAAQ,CAAC;CAChB;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,YA2BhD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createComponent as _$createComponent, createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
|
|
2
2
|
import { OutputSymbolFlags, Show } from "@alloy-js/core";
|
|
3
3
|
import { useTSNamePolicy } from "../name-policy.js";
|
|
4
|
-
import {
|
|
4
|
+
import { TSOutputSymbol } from "../symbols/ts-output-symbol.js";
|
|
5
5
|
import { JSDoc } from "./JSDoc.js";
|
|
6
6
|
import { PropertyName } from "./PropertyName.js";
|
|
7
7
|
import { ValueExpression } from "./ValueExpression.js";
|
|
@@ -13,9 +13,8 @@ export function EnumMember(props) {
|
|
|
13
13
|
const name = namer.getName(props.name, "enum-member");
|
|
14
14
|
let sym = undefined;
|
|
15
15
|
if (props.refkey) {
|
|
16
|
-
sym =
|
|
17
|
-
|
|
18
|
-
refkey: props.refkey,
|
|
16
|
+
sym = new TSOutputSymbol(name, {
|
|
17
|
+
refkeys: props.refkey,
|
|
19
18
|
flags: OutputSymbolFlags.StaticMember,
|
|
20
19
|
metadata: props.metadata
|
|
21
20
|
});
|
|
@@ -3,5 +3,5 @@ export interface ExportStatementProps {
|
|
|
3
3
|
star?: boolean;
|
|
4
4
|
from?: TSModuleScope;
|
|
5
5
|
}
|
|
6
|
-
export declare function ExportStatement(props: ExportStatementProps): import("@alloy-js/core").Children;
|
|
6
|
+
export declare function ExportStatement(props: ExportStatementProps): import("@alloy-js/core/jsx-runtime").Children;
|
|
7
7
|
//# sourceMappingURL=ExportStatement.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExportStatement.d.ts","sourceRoot":"","sources":["../../../src/components/ExportStatement.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAkB,MAAM,qBAAqB,CAAC;AAIpE,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"ExportStatement.d.ts","sourceRoot":"","sources":["../../../src/components/ExportStatement.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAkB,MAAM,qBAAqB,CAAC;AAIpE,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,iDAiB1D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Children } from "@alloy-js/core";
|
|
2
2
|
import type { ParameterDescriptor } from "../parameter-descriptor.js";
|
|
3
3
|
import { TypeParameterDescriptor } from "../parameter-descriptor.js";
|
|
4
4
|
export interface FunctionBodyProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FunctionBase.d.ts","sourceRoot":"","sources":["../../../src/components/FunctionBase.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FunctionBase.d.ts","sourceRoot":"","sources":["../../../src/components/FunctionBase.tsx"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,QAAQ,EACd,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAEV,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAQrE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;CAC9B;AAED,oCAAoC;AACpC,MAAM,WAAW,uBAAuB;IACtC,iBAAiB;IACjB,QAAQ,CAAC,UAAU,CAAC,EAAE,mBAAmB,EAAE,GAAG,MAAM,EAAE,CAAC;IACvD,mBAAmB;IACnB,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;CAC9B;AAED,iEAAiE;AACjE,MAAM,WAAW,2BAA2B;IAC1C,iBAAiB;IACjB,QAAQ,CAAC,UAAU,CAAC,EAAE,mBAAmB,EAAE,GAAG,MAAM,EAAE,CAAC;IACvD,mBAAmB;IACnB,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;CAC9B;AAED,gCAAgC;AAChC,MAAM,WAAW,mBAAmB;IAClC,iBAAiB;IACjB,UAAU,CAAC,EAAE,uBAAuB,EAAE,GAAG,MAAM,EAAE,CAAC;IAClD,mBAAmB;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,sIAKxB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,kJAmB9B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,0JAmBlC,CAAC;AA0GF;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,0IAkC1B,CAAC;AAkBF,wBAAgB,aAAa,CAC3B,UAAU,EAAE,QAAQ,GAAG,SAAS,EAChC,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAqB,YAKhD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createComponent as _$createComponent, createIntrinsic as _$createIntrinsic, memo as _$memo } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { Block, code, For, Indent, onCleanup, Show, taggedComponent } from "@alloy-js/core";
|
|
2
|
+
import { Block, code, createSymbolSlot, For, Indent, onCleanup, Show, taggedComponent } from "@alloy-js/core";
|
|
3
3
|
import { useTSNamePolicy } from "../name-policy.js";
|
|
4
|
-
import {
|
|
4
|
+
import { TSOutputSymbol, TSSymbolFlags } from "../symbols/index.js";
|
|
5
5
|
import { TypeRefContext } from "./TypeRefContext.js";
|
|
6
6
|
const functionParametersTag = Symbol();
|
|
7
7
|
const typeParametersTag = Symbol();
|
|
@@ -88,6 +88,8 @@ export const FunctionTypeParameters = taggedComponent(functionParametersTag, fun
|
|
|
88
88
|
});
|
|
89
89
|
});
|
|
90
90
|
function parameter(param) {
|
|
91
|
+
const SymbolSlot = createSymbolSlot();
|
|
92
|
+
SymbolSlot.instantiateInto(param.symbol);
|
|
91
93
|
return _$createIntrinsic("group", {
|
|
92
94
|
get children() {
|
|
93
95
|
return [_$createComponent(Show, {
|
|
@@ -107,9 +109,13 @@ function parameter(param) {
|
|
|
107
109
|
get children() {
|
|
108
110
|
return _$createIntrinsic("indent", {
|
|
109
111
|
get children() {
|
|
110
|
-
return [": ", _$createComponent(
|
|
112
|
+
return [":", " ", _$createComponent(SymbolSlot, {
|
|
111
113
|
get children() {
|
|
112
|
-
return
|
|
114
|
+
return _$createComponent(TypeRefContext, {
|
|
115
|
+
get children() {
|
|
116
|
+
return param.type;
|
|
117
|
+
}
|
|
118
|
+
});
|
|
113
119
|
}
|
|
114
120
|
})];
|
|
115
121
|
}
|
|
@@ -126,8 +132,8 @@ function normalizeAndDeclareParameters(parameters, flags = TSSymbolFlags.Paramet
|
|
|
126
132
|
}
|
|
127
133
|
if (typeof parameters[0] === "string") {
|
|
128
134
|
return parameters.map(paramName => {
|
|
129
|
-
const
|
|
130
|
-
|
|
135
|
+
const name = namePolicy.getName(paramName, flags & TSSymbolFlags.TypeSymbol ? "type" : "parameter");
|
|
136
|
+
const symbol = new TSOutputSymbol(name, {
|
|
131
137
|
tsFlags: flags
|
|
132
138
|
});
|
|
133
139
|
return {
|
|
@@ -138,9 +144,8 @@ function normalizeAndDeclareParameters(parameters, flags = TSSymbolFlags.Paramet
|
|
|
138
144
|
} else {
|
|
139
145
|
return parameters.map(param => {
|
|
140
146
|
const nullishFlag = param.nullish ?? param.optional ? TSSymbolFlags.Nullish : TSSymbolFlags.None;
|
|
141
|
-
const symbol =
|
|
142
|
-
|
|
143
|
-
refkey: param.refkey,
|
|
147
|
+
const symbol = new TSOutputSymbol(namePolicy.getName(param.name, flags & TSSymbolFlags.TypeSymbol ? "type" : "parameter"), {
|
|
148
|
+
refkeys: param.refkey,
|
|
144
149
|
tsFlags: flags | nullishFlag,
|
|
145
150
|
metadata: param.metadata
|
|
146
151
|
});
|
|
@@ -170,7 +175,7 @@ export const TypeParameters = taggedComponent(typeParametersTag, function TypePa
|
|
|
170
175
|
const typeParameters = normalizeAndDeclareParameters(props.parameters);
|
|
171
176
|
onCleanup(() => {
|
|
172
177
|
for (const param of typeParameters) {
|
|
173
|
-
param.symbol.
|
|
178
|
+
param.symbol.delete();
|
|
174
179
|
}
|
|
175
180
|
});
|
|
176
181
|
return ["<", _$createIntrinsic("group", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Children } from "@alloy-js/core
|
|
1
|
+
import { type Children } from "@alloy-js/core";
|
|
2
2
|
import { CallSignatureProps } from "./CallSignature.jsx";
|
|
3
3
|
import { BaseDeclarationProps } from "./Declaration.js";
|
|
4
4
|
export interface FunctionDeclarationProps extends BaseDeclarationProps, CallSignatureProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FunctionDeclaration.d.ts","sourceRoot":"","sources":["../../../src/components/FunctionDeclaration.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FunctionDeclaration.d.ts","sourceRoot":"","sources":["../../../src/components/FunctionDeclaration.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,QAAQ,EACd,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAiB,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAe,MAAM,kBAAkB,CAAC;AAUrE,MAAM,WAAW,wBACf,SAAQ,oBAAoB,EAC1B,kBAAkB;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,YAyClE;yBAzCe,mBAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FunctionExpression.d.ts","sourceRoot":"","sources":["../../../src/components/FunctionExpression.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FunctionExpression.d.ts","sourceRoot":"","sources":["../../../src/components/FunctionExpression.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,QAAQ,EACd,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAiB,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AASxE,MAAM,WAAW,uBAAwB,SAAQ,kBAAkB;IACjE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,YAiChE;yBAjCe,kBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FunctionType.d.ts","sourceRoot":"","sources":["../../../src/components/FunctionType.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FunctionType.d.ts","sourceRoot":"","sources":["../../../src/components/FunctionType.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,QAAQ,EACd,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAiB,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAWxE;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D,6BAA6B;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACzB,qCAAqC;IACrC,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC;IACxB,kBAAkB;IAClB,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;CAC9B;AAuCD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,YAAY;;;CAGvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IfStatement.d.ts","sourceRoot":"","sources":["../../../src/components/IfStatement.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IfStatement.d.ts","sourceRoot":"","sources":["../../../src/components/IfStatement.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAEtD,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,QAAQ,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,YAMlD;AAED,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,QAAQ,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,YAOpD;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,YAOhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImportStatement.d.ts","sourceRoot":"","sources":["../../../src/components/ImportStatement.tsx"],"names":[],"mappings":"AAQA,OAAO,EACL,cAAc,EACd,aAAa,EAGd,MAAM,qBAAqB,CAAC;AAI7B,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"ImportStatement.d.ts","sourceRoot":"","sources":["../../../src/components/ImportStatement.tsx"],"names":[],"mappings":"AAQA,OAAO,EACL,cAAc,EACd,aAAa,EAGd,MAAM,qBAAqB,CAAC;AAI7B,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,6CA+C5D;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC9B;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,eAqD1D"}
|
|
@@ -45,7 +45,7 @@ export const InterfaceDeclaration = ensureTypeRefContext(props => {
|
|
|
45
45
|
export const InterfaceExpression = ensureTypeRefContext(props => {
|
|
46
46
|
const parentMemberSym = useMemberDeclaration();
|
|
47
47
|
if (parentMemberSym) {
|
|
48
|
-
parentMemberSym.
|
|
48
|
+
parentMemberSym.flags |= OutputSymbolFlags.StaticMemberContainer;
|
|
49
49
|
}
|
|
50
50
|
return _$createIntrinsic("group", {
|
|
51
51
|
get children() {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Refkey } from "@alloy-js/core";
|
|
2
|
-
import { Children } from "@alloy-js/core/jsx-runtime";
|
|
1
|
+
import { Refkey, type Children } from "@alloy-js/core";
|
|
3
2
|
import { CallSignatureProps } from "./CallSignature.jsx";
|
|
4
3
|
/** Props for {@link (InterfaceMethod:namespace)} component */
|
|
5
4
|
export interface InterfaceMethodProps extends CallSignatureProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InterfaceMethod.d.ts","sourceRoot":"","sources":["../../../src/components/InterfaceMethod.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,MAAM,
|
|
1
|
+
{"version":3,"file":"InterfaceMethod.d.ts","sourceRoot":"","sources":["../../../src/components/InterfaceMethod.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,MAAM,EAGN,KAAK,QAAQ,EACd,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAiB,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAUxE,8DAA8D;AAC9D,MAAM,WAAW,oBAAqB,SAAQ,kBAAkB;IAC9D,4BAA4B;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,qFAAqF;IACrF,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACzB,qCAAqC;IACrC,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC;IACxB,kBAAkB;IAClB,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAC7B,yCAAyC;IACzC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CACrC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,YAmC1D;yBAnCe,eAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JSDoc.d.ts","sourceRoot":"","sources":["../../../src/components/JSDoc.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"JSDoc.d.ts","sourceRoot":"","sources":["../../../src/components/JSDoc.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAGpE,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,YAMtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JSDocComment.d.ts","sourceRoot":"","sources":["../../../src/components/JSDocComment.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"JSDocComment.d.ts","sourceRoot":"","sources":["../../../src/components/JSDocComment.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,YAWpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JSDocExample.d.ts","sourceRoot":"","sources":["../../../src/components/JSDocExample.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"JSDocExample.d.ts","sourceRoot":"","sources":["../../../src/components/JSDocExample.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAErD,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,YAgBpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JSDocParam.d.ts","sourceRoot":"","sources":["../../../src/components/JSDocParam.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"JSDocParam.d.ts","sourceRoot":"","sources":["../../../src/components/JSDocParam.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,mBAAmB,EAAE,GAAG,MAAM,EAAE,CAAC;CAC9C;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,YAgBlD;AAYD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,QAAQ,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,YAahD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemberDeclaration.d.ts","sourceRoot":"","sources":["../../../src/components/MemberDeclaration.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,8BAA8B,EAC9B,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAmB,MAAM,mBAAmB,CAAC;AACxE,OAAO,
|
|
1
|
+
{"version":3,"file":"MemberDeclaration.d.ts","sourceRoot":"","sources":["../../../src/components/MemberDeclaration.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,8BAA8B,EAC9B,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAmB,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAiB,MAAM,qBAAqB,CAAC;AAEpE,MAAM,WAAW,sBACf,SAAQ,IAAI,CAAC,8BAA8B,EAAE,MAAM,CAAC;IACpD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAE9B;;OAEG;IACH,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAE1B;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,qCA4BxE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
2
|
import { MemberDeclaration as CoreMemberDeclaration } from "@alloy-js/core";
|
|
3
3
|
import { useTSNamePolicy } from "../name-policy.js";
|
|
4
|
-
import {
|
|
4
|
+
import { TSOutputSymbol, TSSymbolFlags } from "../symbols/index.js";
|
|
5
5
|
export function MemberDeclaration(props) {
|
|
6
6
|
let sym;
|
|
7
7
|
if (props.symbol) {
|
|
@@ -12,9 +12,9 @@ export function MemberDeclaration(props) {
|
|
|
12
12
|
if (props.kind === "type") {
|
|
13
13
|
tsFlags |= TSSymbolFlags.TypeSymbol;
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
const name = props.exactName ?? namePolicy.getName(props.name, props.nameKind);
|
|
16
|
+
sym = new TSOutputSymbol(name, {
|
|
17
|
+
refkeys: props.refkey,
|
|
18
18
|
flags: props.flags,
|
|
19
19
|
tsFlags,
|
|
20
20
|
metadata: props.metadata
|
|
@@ -47,7 +47,12 @@ export interface MemberExpressionPartProps {
|
|
|
47
47
|
/**
|
|
48
48
|
* The identifier for this part of the member expression.
|
|
49
49
|
*/
|
|
50
|
-
id?: string;
|
|
50
|
+
id?: string | number;
|
|
51
|
+
/**
|
|
52
|
+
* The index for this part of the member expression. This is used when
|
|
53
|
+
* the part is an array access (i.e. `foo[0]`).
|
|
54
|
+
*/
|
|
55
|
+
index?: number;
|
|
51
56
|
/**
|
|
52
57
|
* Whether the identifier should be quoted or not. Only needed when
|
|
53
58
|
* providing the `children` prop, otherwise it is determined automatically.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemberExpression.d.ts","sourceRoot":"","sources":["../../../src/components/MemberExpression.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAKR,YAAY,EAGZ,MAAM,
|
|
1
|
+
{"version":3,"file":"MemberExpression.d.ts","sourceRoot":"","sources":["../../../src/components/MemberExpression.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAKR,YAAY,EAGZ,MAAM,EAKP,MAAM,gBAAgB,CAAC;AAKxB,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAkBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,QAAQ,CA6BvE;yBA7Be,gBAAgB;sBA2cS,yBAAyB;;AA5DlE,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAErB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;IAE5B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB"}
|