@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createIntrinsic as _$createIntrinsic, memo as _$memo, createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { childrenArray, computed, For, isComponentCreator, reactive, ref, Show, useBinder } from "@alloy-js/core";
|
|
2
|
+
import { childrenArray, computed, For, isComponentCreator, reactive, ref, Show, takeSymbols, useBinder } from "@alloy-js/core";
|
|
3
3
|
import { TSSymbolFlags } from "../symbols/ts-output-symbol.js";
|
|
4
4
|
import { isValidJSIdentifier } from "../utils.js";
|
|
5
5
|
/**
|
|
@@ -42,6 +42,9 @@ import { isValidJSIdentifier } from "../utils.js";
|
|
|
42
42
|
export function MemberExpression(props) {
|
|
43
43
|
const children = flattenMemberExpression(childrenArray(() => props.children));
|
|
44
44
|
const parts = childrenToPartDescriptors(children);
|
|
45
|
+
// any symbols emitted from the children won't be relevant to
|
|
46
|
+
// parent scopes. TODO: emit the proper symbol if we know it?
|
|
47
|
+
takeSymbols();
|
|
45
48
|
if (parts.length === 0) {
|
|
46
49
|
return [];
|
|
47
50
|
}
|
|
@@ -104,12 +107,14 @@ function createPartDescriptorFromProps(partProps, first) {
|
|
|
104
107
|
id: computed(() => {
|
|
105
108
|
if (partProps.args) {
|
|
106
109
|
return undefined;
|
|
107
|
-
} else if (
|
|
110
|
+
} else if (partProps.children !== undefined) {
|
|
108
111
|
return partProps.children;
|
|
109
112
|
} else if (first && partProps.refkey) {
|
|
110
113
|
return partProps.refkey;
|
|
111
|
-
} else if (partProps.id) {
|
|
112
|
-
return escapeId(partProps.id);
|
|
114
|
+
} else if (partProps.id !== undefined) {
|
|
115
|
+
return isNumericIdentifier(partProps.id) ? partProps.id : escapeId(partProps.id);
|
|
116
|
+
} else if (partProps.index !== undefined) {
|
|
117
|
+
return partProps.index;
|
|
113
118
|
} else if (symbolSource.value) {
|
|
114
119
|
return escapeId(symbolSource.value.name);
|
|
115
120
|
} else {
|
|
@@ -117,13 +122,20 @@ function createPartDescriptorFromProps(partProps, first) {
|
|
|
117
122
|
}
|
|
118
123
|
}),
|
|
119
124
|
accessStyle: computed(() => {
|
|
120
|
-
if (partProps.
|
|
125
|
+
if (partProps.children !== undefined) {
|
|
126
|
+
if (typeof partProps.children === "string") {
|
|
127
|
+
return partProps.quoteId ? "bracket" : accessStyleForMemberName(partProps.children);
|
|
128
|
+
}
|
|
129
|
+
return "bracket";
|
|
130
|
+
} else if (partProps.args) {
|
|
121
131
|
// not used
|
|
122
132
|
return "dot";
|
|
123
133
|
} else if (partProps.quoteId) {
|
|
124
134
|
return "bracket";
|
|
125
|
-
} else if (partProps.id) {
|
|
126
|
-
return accessStyleForMemberName(partProps.id);
|
|
135
|
+
} else if (partProps.id !== undefined) {
|
|
136
|
+
return isNumericIdentifier(partProps.id) ? "bracket" : accessStyleForMemberName(partProps.id);
|
|
137
|
+
} else if (partProps.index !== undefined) {
|
|
138
|
+
return "bracket";
|
|
127
139
|
} else if (symbolSource.value) {
|
|
128
140
|
return accessStyleForMemberName(symbolSource.value.name);
|
|
129
141
|
} else {
|
|
@@ -133,8 +145,8 @@ function createPartDescriptorFromProps(partProps, first) {
|
|
|
133
145
|
quoteId: computed(() => {
|
|
134
146
|
if (partProps.quoteId) {
|
|
135
147
|
return partProps.quoteId;
|
|
136
|
-
} else if (partProps.id) {
|
|
137
|
-
return !isValidJSIdentifier(partProps.id);
|
|
148
|
+
} else if (partProps.id !== undefined) {
|
|
149
|
+
return isNumericIdentifier(partProps.id) ? false : !isValidJSIdentifier(partProps.id);
|
|
138
150
|
} else if (symbolSource.value) {
|
|
139
151
|
return !isValidJSIdentifier(symbolSource.value.name);
|
|
140
152
|
} else {
|
|
@@ -242,7 +254,8 @@ function formatCallChain(parts) {
|
|
|
242
254
|
for (let partIndex = 0; partIndex < chunk.length; partIndex++) {
|
|
243
255
|
if (chunkIndex === 0 && partIndex === 0) {
|
|
244
256
|
// first part is just gonna be the id
|
|
245
|
-
|
|
257
|
+
const firstPart = isIdPartDescriptor(chunk[0]) ? chunk[0].id : chunk[0].index;
|
|
258
|
+
chunkExpression.push(firstPart);
|
|
246
259
|
continue;
|
|
247
260
|
}
|
|
248
261
|
const part = chunk[partIndex];
|
|
@@ -273,7 +286,7 @@ function formatNonCallChain(parts) {
|
|
|
273
286
|
const expression = [];
|
|
274
287
|
for (let i = 0; i < parts.length; i++) {
|
|
275
288
|
const part = parts[i];
|
|
276
|
-
const base = part.id;
|
|
289
|
+
const base = isIdPartDescriptor(part) ? part.id : part.index;
|
|
277
290
|
if (i === 0) {
|
|
278
291
|
expression.push(base);
|
|
279
292
|
} else {
|
|
@@ -298,7 +311,7 @@ function formatArrayAccess(prevPart, part) {
|
|
|
298
311
|
get children() {
|
|
299
312
|
return [_$memo(() => prevPart.nullish ? "?." : ""), "[", _$createIntrinsic("indent", {
|
|
300
313
|
get children() {
|
|
301
|
-
return [_$createIntrinsic("sbr", {}), _$memo(() => part.quoteId && '"'), _$memo(() => part.id), _$memo(() => part.quoteId && '"')];
|
|
314
|
+
return [_$createIntrinsic("sbr", {}), _$memo(() => part.quoteId && '"'), _$memo(() => isIdPartDescriptor(part) ? part.id : part.index), _$memo(() => part.quoteId && '"')];
|
|
302
315
|
}
|
|
303
316
|
}), _$createIntrinsic("sbr", {}), "]"];
|
|
304
317
|
}
|
|
@@ -309,7 +322,7 @@ function formatDotAccess(prevPart, part) {
|
|
|
309
322
|
get children() {
|
|
310
323
|
return _$createIntrinsic("indent", {
|
|
311
324
|
get children() {
|
|
312
|
-
return [_$createIntrinsic("sbr", {}), _$memo(() => prevPart.nullish ? "?." : "."), _$memo(() => part.id)];
|
|
325
|
+
return [_$createIntrinsic("sbr", {}), _$memo(() => prevPart.nullish ? "?." : "."), _$memo(() => isIdPartDescriptor(part) ? part.id : part.index)];
|
|
313
326
|
}
|
|
314
327
|
});
|
|
315
328
|
}
|
|
@@ -388,4 +401,15 @@ MemberExpression.Part = function (props) {
|
|
|
388
401
|
* This component does nothing except hold props which are retrieved by
|
|
389
402
|
* the `MemberExpression` component.
|
|
390
403
|
*/
|
|
391
|
-
};
|
|
404
|
+
};
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* Check if the given id is a numeric identifier.
|
|
408
|
+
*
|
|
409
|
+
*/
|
|
410
|
+
function isNumericIdentifier(id) {
|
|
411
|
+
return typeof id === "number";
|
|
412
|
+
}
|
|
413
|
+
function isIdPartDescriptor(part) {
|
|
414
|
+
return "id" in part;
|
|
415
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FunctionCallExpressionProps } from "./FunctionCallExpression.jsx";
|
|
2
|
+
export interface NewExpressionProps extends FunctionCallExpressionProps {
|
|
3
|
+
}
|
|
4
|
+
export declare function NewExpression(props: NewExpressionProps): import("@alloy-js/core").Children;
|
|
5
|
+
//# sourceMappingURL=NewExpression.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NewExpression.d.ts","sourceRoot":"","sources":["../../../src/components/NewExpression.tsx"],"names":[],"mappings":"AAMA,OAAO,EAEL,2BAA2B,EAC5B,MAAM,8BAA8B,CAAC;AAEtC,MAAM,WAAW,kBAAmB,SAAQ,2BAA2B;CAAG;AAE1E,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,qCAWtD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
|
+
import { emitSymbol, instantiateTakenMembersTo as instantiateTakenSymbolsTo, OutputSymbolFlags } from "@alloy-js/core";
|
|
3
|
+
import { TSOutputSymbol } from "../symbols/ts-output-symbol.js";
|
|
4
|
+
import { FunctionCallExpression } from "./FunctionCallExpression.js";
|
|
5
|
+
export function NewExpression(props) {
|
|
6
|
+
const sym = new TSOutputSymbol("", {
|
|
7
|
+
flags: OutputSymbolFlags.Transient
|
|
8
|
+
});
|
|
9
|
+
instantiateTakenSymbolsTo(sym);
|
|
10
|
+
emitSymbol(sym);
|
|
11
|
+
return ["new ", _$createComponent(FunctionCallExpression, props)];
|
|
12
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectExpression.d.ts","sourceRoot":"","sources":["../../../src/components/ObjectExpression.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,QAAQ,
|
|
1
|
+
{"version":3,"file":"ObjectExpression.d.ts","sourceRoot":"","sources":["../../../src/components/ObjectExpression.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,QAAQ,EASR,MAAM,EAGP,MAAM,gBAAgB,CAAC;AAMxB,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,CAAC,EACJ,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GACnB,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GACpB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC7B;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,YAuD5D;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,QAAQ,CAAC;IAC1B,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC5B;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,YA8CxD;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,YAYpE"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { memo as _$memo, createComponent as _$createComponent, createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { AssignmentContext, Block, computed, createAssignmentContext,
|
|
2
|
+
import { AssignmentContext, Block, computed, createAssignmentContext, emitSymbol, For, Match, MemberScope, moveTakenMembersTo, OutputSymbolFlags, Switch, takeSymbols } 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 { PropertyName } from "./PropertyName.js";
|
|
6
6
|
import { ValueExpression } from "./ValueExpression.js";
|
|
7
7
|
export function ObjectExpression(props) {
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
const symbol = new TSOutputSymbol("", {
|
|
9
|
+
flags: OutputSymbolFlags.StaticMemberContainer | OutputSymbolFlags.Transient
|
|
10
|
+
});
|
|
11
|
+
emitSymbol(symbol);
|
|
12
12
|
const jsValueProperties = computed(() => {
|
|
13
13
|
const jsValue = props.jsValue;
|
|
14
14
|
let properties;
|
|
@@ -35,12 +35,8 @@ export function ObjectExpression(props) {
|
|
|
35
35
|
get children() {
|
|
36
36
|
return _$createIntrinsic("group", {
|
|
37
37
|
get children() {
|
|
38
|
-
return _$createComponent(
|
|
39
|
-
|
|
40
|
-
"with": MemberScope,
|
|
41
|
-
props: {
|
|
42
|
-
owner: assignmentSymbol
|
|
43
|
-
},
|
|
38
|
+
return _$createComponent(MemberScope, {
|
|
39
|
+
owner: symbol,
|
|
44
40
|
get children() {
|
|
45
41
|
return _$createComponent(Block, {
|
|
46
42
|
get children() {
|
|
@@ -67,12 +63,12 @@ export function ObjectExpression(props) {
|
|
|
67
63
|
}
|
|
68
64
|
export function ObjectProperty(props) {
|
|
69
65
|
let name;
|
|
66
|
+
let symbolName = props.name;
|
|
70
67
|
if (props.name) {
|
|
71
68
|
const namer = useTSNamePolicy();
|
|
69
|
+
symbolName = namer.getName(props.name, "object-member-data");
|
|
72
70
|
name = _$createComponent(PropertyName, {
|
|
73
|
-
|
|
74
|
-
return namer.getName(props.name, "object-member-data");
|
|
75
|
-
}
|
|
71
|
+
name: symbolName
|
|
76
72
|
});
|
|
77
73
|
} else if (props.nameExpression) {
|
|
78
74
|
name = ["[", _$memo(() => props.nameExpression), "]"];
|
|
@@ -81,11 +77,14 @@ export function ObjectProperty(props) {
|
|
|
81
77
|
}
|
|
82
78
|
let sym = undefined;
|
|
83
79
|
if (props.refkey && props.name) {
|
|
84
|
-
sym =
|
|
85
|
-
|
|
86
|
-
refkey: props.refkey,
|
|
80
|
+
sym = new TSOutputSymbol(symbolName, {
|
|
81
|
+
refkeys: props.refkey,
|
|
87
82
|
flags: OutputSymbolFlags.StaticMember
|
|
88
83
|
});
|
|
84
|
+
moveTakenMembersTo(sym);
|
|
85
|
+
} else {
|
|
86
|
+
// noop
|
|
87
|
+
takeSymbols();
|
|
89
88
|
}
|
|
90
89
|
let value;
|
|
91
90
|
if (props.value) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PackageDirectory.d.ts","sourceRoot":"","sources":["../../../src/components/PackageDirectory.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,gBAAgB,EAEhB,GAAG,
|
|
1
|
+
{"version":3,"file":"PackageDirectory.d.ts","sourceRoot":"","sources":["../../../src/components/PackageDirectory.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,gBAAgB,EAEhB,GAAG,EAOJ,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAmB,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAGzE,MAAM,WAAW,qBAAsB,SAAQ,oBAAoB;IACjE,QAAQ,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,cAAc,EAAE,gBAAgB,CAAC,cAAc,CACC,CAAC;AAE9D,wBAAgB,UAAU,+BAGzB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,cAAc,CAAC;IAEtB;;OAEG;IACH,aAAa,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC;CAC9C;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,YA8B5D"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { memo as _$memo, mergeProps as _$mergeProps, createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { createNamedContext, Scope, shallowRef, SourceDirectory, SourceDirectoryContext, splitProps,
|
|
2
|
+
import { createNamedContext, Scope, shallowRef, SourceDirectory, SourceDirectoryContext, splitProps, useContext } from "@alloy-js/core";
|
|
3
3
|
import { join } from "pathe";
|
|
4
|
-
import {
|
|
4
|
+
import { TSPackageScope } from "../symbols/index.js";
|
|
5
5
|
import { modulePath } from "../utils.js";
|
|
6
6
|
import { PackageJsonFile } from "./PackageJson.js";
|
|
7
7
|
import { TSConfigJson } from "./TsConfigJson.js";
|
|
@@ -44,7 +44,7 @@ function createPackageContext(name, version, path) {
|
|
|
44
44
|
const parentDir = useContext(SourceDirectoryContext);
|
|
45
45
|
// todo: this can probably just use context.
|
|
46
46
|
const fullPath = parentDir ? join(parentDir.path, path) : path;
|
|
47
|
-
const scope =
|
|
47
|
+
const scope = new TSPackageScope(name, version, fullPath);
|
|
48
48
|
return {
|
|
49
49
|
scope,
|
|
50
50
|
outFileMapper: shallowRef(path => modulePath(path))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Reference.d.ts","sourceRoot":"","sources":["../../../src/components/Reference.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Reference.d.ts","sourceRoot":"","sources":["../../../src/components/Reference.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwB,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAI9D,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wBAAgB,SAAS,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,cAAc,qCAOzD"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
|
|
2
|
+
import { computed, emitSymbol } from "@alloy-js/core";
|
|
1
3
|
import { isTypeRefContext } from "../context/type-ref-context.js";
|
|
2
4
|
import { ref } from "../symbols/index.js";
|
|
3
5
|
export function Reference({
|
|
@@ -8,5 +10,7 @@ export function Reference({
|
|
|
8
10
|
const reference = ref(refkey, {
|
|
9
11
|
type: type ?? inTypeRef
|
|
10
12
|
});
|
|
11
|
-
|
|
13
|
+
const symbolRef = computed(() => reference()[1]);
|
|
14
|
+
emitSymbol(symbolRef);
|
|
15
|
+
return [_$memo(() => reference()[0])];
|
|
12
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleLineCommentBlock.d.ts","sourceRoot":"","sources":["../../../src/components/SingleLineCommentBlock.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SingleLineCommentBlock.d.ts","sourceRoot":"","sources":["../../../src/components/SingleLineCommentBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAEtD,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,YASxE"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ComponentContext } from "@alloy-js/core";
|
|
2
|
-
import { Children } from "@alloy-js/core/jsx-runtime";
|
|
1
|
+
import { ComponentContext, type Children } from "@alloy-js/core";
|
|
3
2
|
import { TSModuleScope } from "../symbols/index.js";
|
|
4
3
|
export interface SourceFileContext {
|
|
5
4
|
scope: TSModuleScope;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SourceFile.d.ts","sourceRoot":"","sources":["../../../src/components/SourceFile.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,
|
|
1
|
+
{"version":3,"file":"SourceFile.d.ts","sourceRoot":"","sources":["../../../src/components/SourceFile.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAOhB,KAAK,QAAQ,EACd,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAKpD,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,aAAa,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,EAAE,gBAAgB,CAAC,iBAAiB,CACX,CAAC;AAExD,wBAAgB,aAAa,sBAE5B;AACD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC3B;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,YAkDhD;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,QAAQ,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createComponent as _$createComponent, createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { SourceFile as CoreSourceFile, createNamedContext, Scope, Show, SourceDirectoryContext,
|
|
2
|
+
import { SourceFile as CoreSourceFile, createNamedContext, Scope, Show, SourceDirectoryContext, useContext } from "@alloy-js/core";
|
|
3
3
|
import { join } from "pathe";
|
|
4
4
|
import { getSourceDirectoryData } from "../source-directory-data.js";
|
|
5
|
-
import {
|
|
5
|
+
import { TSModuleScope } from "../symbols/index.js";
|
|
6
6
|
import { ImportStatements } from "./ImportStatement.js";
|
|
7
7
|
import { PackageContext } from "./PackageDirectory.js";
|
|
8
8
|
import { Reference } from "./Reference.js";
|
|
@@ -16,7 +16,7 @@ export function SourceFile(props) {
|
|
|
16
16
|
const sdData = getSourceDirectoryData(directoryContext);
|
|
17
17
|
const currentDir = directoryContext.path;
|
|
18
18
|
const path = join(currentDir, props.path);
|
|
19
|
-
const scope =
|
|
19
|
+
const scope = new TSModuleScope(path);
|
|
20
20
|
sdData.modules.add(scope);
|
|
21
21
|
const pkg = useContext(PackageContext);
|
|
22
22
|
if (pkg) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwitchStatement.d.ts","sourceRoot":"","sources":["../../../src/components/SwitchStatement.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SwitchStatement.d.ts","sourceRoot":"","sources":["../../../src/components/SwitchStatement.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAI7E,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,QAAQ,CAAC;IACrB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,YAM1D;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,6BAA8B,SAAQ,mBAAmB;IACxE,UAAU,EAAE,QAAQ,CAAC;CACtB;AAED,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACnE,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,0BAA2B,SAAQ,mBAAmB;IACrE,OAAO,EAAE,IAAI,CAAC;CACf;AAED,MAAM,MAAM,eAAe,GACvB,6BAA6B,GAC7B,wBAAwB,GACxB,0BAA0B,CAAC;AAE/B;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,YA4BhD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeRefContext.d.ts","sourceRoot":"","sources":["../../../src/components/TypeRefContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"TypeRefContext.d.ts","sourceRoot":"","sources":["../../../src/components/TypeRefContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAM/C,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,GAAI,cAAc,mBAAmB,aAM/D,CAAC;AAEF;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,OAAO,EAAE,EACtD,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,QAAQ,GAC3B,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,QAAQ,CAa1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VarDeclaration.d.ts","sourceRoot":"","sources":["../../../src/components/VarDeclaration.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"VarDeclaration.d.ts","sourceRoot":"","sources":["../../../src/components/VarDeclaration.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAOT,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAIxD,MAAM,WAAW,mBAAoB,SAAQ,oBAAoB;IAC/D,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,YA0DxD"}
|
|
@@ -1,26 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { createComponent as _$createComponent, createIntrinsic as _$createIntrinsic, memo as _$memo } from "@alloy-js/core/jsx-runtime";
|
|
2
|
+
import { Declaration as CoreDeclaration, createSymbolSlot, effect, Name, OutputSymbolFlags, Show } from "@alloy-js/core";
|
|
3
3
|
import { useTSNamePolicy } from "../name-policy.js";
|
|
4
|
-
import {
|
|
4
|
+
import { TSOutputSymbol, TSSymbolFlags } from "../symbols/ts-output-symbol.js";
|
|
5
5
|
import { JSDoc } from "./JSDoc.js";
|
|
6
6
|
import { TypeRefContext } from "./TypeRefContext.js";
|
|
7
7
|
export function VarDeclaration(props) {
|
|
8
|
+
const TypeSymbolSlot = createSymbolSlot();
|
|
9
|
+
const ValueTypeSymbolSlot = createSymbolSlot();
|
|
10
|
+
effect(() => {
|
|
11
|
+
if (TypeSymbolSlot.ref.value) {
|
|
12
|
+
const takenSymbols = TypeSymbolSlot.ref.value;
|
|
13
|
+
for (const symbol of takenSymbols) {
|
|
14
|
+
symbol.instantiateTo(sym);
|
|
15
|
+
}
|
|
16
|
+
} else if (ValueTypeSymbolSlot.ref.value) {
|
|
17
|
+
const takenSymbols = ValueTypeSymbolSlot.ref.value;
|
|
18
|
+
for (const symbol of takenSymbols) {
|
|
19
|
+
// ignore non-transient symbols (likely not the result of an
|
|
20
|
+
// expression).
|
|
21
|
+
if (symbol.flags & OutputSymbolFlags.Transient) {
|
|
22
|
+
symbol.moveTo(sym);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
8
27
|
const keyword = props.var ? "var" : props.let ? "let" : "const";
|
|
9
28
|
const type = props.type ? _$createComponent(TypeRefContext, {
|
|
10
29
|
get children() {
|
|
11
|
-
return [": ", _$
|
|
30
|
+
return [": ", _$createComponent(TypeSymbolSlot, {
|
|
31
|
+
get children() {
|
|
32
|
+
return props.type;
|
|
33
|
+
}
|
|
34
|
+
})];
|
|
12
35
|
}
|
|
13
36
|
}) : undefined;
|
|
14
37
|
const name = useTSNamePolicy().getName(props.name, "variable");
|
|
15
|
-
const sym =
|
|
16
|
-
|
|
17
|
-
refkey: props.refkey,
|
|
38
|
+
const sym = new TSOutputSymbol(name, {
|
|
39
|
+
refkeys: props.refkey,
|
|
18
40
|
default: props.default,
|
|
19
41
|
export: props.export,
|
|
20
42
|
metadata: props.metadata,
|
|
21
43
|
tsFlags: props.nullish ? TSSymbolFlags.Nullish : TSSymbolFlags.None
|
|
22
44
|
});
|
|
23
|
-
const assignmentContext = createAssignmentContext(sym);
|
|
24
45
|
return [_$createComponent(Show, {
|
|
25
46
|
get when() {
|
|
26
47
|
return Boolean(props.doc);
|
|
@@ -35,8 +56,7 @@ export function VarDeclaration(props) {
|
|
|
35
56
|
}), _$createComponent(CoreDeclaration, {
|
|
36
57
|
symbol: sym,
|
|
37
58
|
get children() {
|
|
38
|
-
return [_$memo(() => props.export ? "export " : ""), _$memo(() => props.default ? "default " : ""), keyword, " ", _$createComponent(Name, {}), type, " =", " ", _$createComponent(
|
|
39
|
-
value: assignmentContext,
|
|
59
|
+
return [_$memo(() => props.export ? "export " : ""), _$memo(() => props.default ? "default " : ""), keyword, " ", _$createComponent(Name, {}), type, " =", " ", _$createComponent(ValueTypeSymbolSlot, {
|
|
40
60
|
get children() {
|
|
41
61
|
return props.initializer ?? props.children;
|
|
42
62
|
}
|
|
@@ -23,6 +23,7 @@ export * from "./JSDoc.jsx";
|
|
|
23
23
|
export * from "./JSDocComment.jsx";
|
|
24
24
|
export * from "./JSDocExample.jsx";
|
|
25
25
|
export * from "./MemberExpression.jsx";
|
|
26
|
+
export * from "./NewExpression.jsx";
|
|
26
27
|
export * from "./ObjectExpression.js";
|
|
27
28
|
export * from "./PackageDirectory.js";
|
|
28
29
|
export * from "./PackageJson.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,GACjC,MAAM,mBAAmB,CAAC;AAC3B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,GACjC,MAAM,mBAAmB,CAAC;AAC3B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC"}
|
|
@@ -22,6 +22,7 @@ export * from "./JSDoc.js";
|
|
|
22
22
|
export * from "./JSDocComment.js";
|
|
23
23
|
export * from "./JSDocExample.js";
|
|
24
24
|
export * from "./MemberExpression.js";
|
|
25
|
+
export * from "./NewExpression.js";
|
|
25
26
|
export * from "./ObjectExpression.js";
|
|
26
27
|
export * from "./PackageDirectory.js";
|
|
27
28
|
export * from "./PackageJson.js";
|
|
@@ -1,45 +1,47 @@
|
|
|
1
|
+
import * as core from "@alloy-js/core";
|
|
1
2
|
import * as base from "../index.js";
|
|
2
|
-
export declare const ArrayExpression:
|
|
3
|
-
export declare const ArrowFunction:
|
|
4
|
-
export declare const BarrelFile:
|
|
5
|
-
export declare const CallSignature:
|
|
6
|
-
export declare const ClassDeclaration:
|
|
7
|
-
export declare const ClassField:
|
|
8
|
-
export declare const ClassMember:
|
|
9
|
-
export declare const ClassMethod:
|
|
10
|
-
export declare const CommaList:
|
|
11
|
-
export declare const Declaration:
|
|
12
|
-
export declare const EnumDeclaration:
|
|
13
|
-
export declare const EnumMember:
|
|
14
|
-
export declare const ExportStatement:
|
|
15
|
-
export declare const FunctionCallExpression:
|
|
16
|
-
export declare const FunctionDeclaration:
|
|
17
|
-
export declare const FunctionExpression:
|
|
18
|
-
export declare const IfStatement:
|
|
19
|
-
export declare const ElseClause:
|
|
20
|
-
export declare const ElseIfClause:
|
|
21
|
-
export declare const ImportStatement:
|
|
22
|
-
export declare const ImportStatements:
|
|
23
|
-
export declare const InterfaceDeclaration:
|
|
24
|
-
export declare const InterfaceExpression:
|
|
25
|
-
export declare const InterfaceMember:
|
|
26
|
-
export declare const InterfaceMethod:
|
|
27
|
-
export declare const JSDoc:
|
|
28
|
-
export declare const JSDocExample:
|
|
29
|
-
export declare const JSDocComment:
|
|
30
|
-
export declare const MemberExpression:
|
|
31
|
-
export declare const
|
|
32
|
-
export declare const
|
|
33
|
-
export declare const
|
|
34
|
-
export declare const
|
|
35
|
-
export declare const
|
|
36
|
-
export declare const
|
|
37
|
-
export declare const
|
|
38
|
-
export declare const
|
|
39
|
-
export declare const
|
|
40
|
-
export declare const
|
|
41
|
-
export declare const
|
|
42
|
-
export declare const
|
|
43
|
-
export declare const
|
|
44
|
-
export declare const
|
|
3
|
+
export declare const ArrayExpression: core.StcSignature<base.ArrayExpressionProps>;
|
|
4
|
+
export declare const ArrowFunction: core.StcSignature<base.ArrowFunctionProps>;
|
|
5
|
+
export declare const BarrelFile: core.StcSignature<base.BarrelFileProps>;
|
|
6
|
+
export declare const CallSignature: core.StcSignature<base.CallSignatureProps>;
|
|
7
|
+
export declare const ClassDeclaration: core.StcSignature<base.ClassDeclarationProps>;
|
|
8
|
+
export declare const ClassField: core.StcSignature<base.ClassFieldProps>;
|
|
9
|
+
export declare const ClassMember: core.StcSignature<base.ClassMemberProps>;
|
|
10
|
+
export declare const ClassMethod: core.StcSignature<base.ClassMethodProps>;
|
|
11
|
+
export declare const CommaList: core.StcSignature<base.CommaListProps>;
|
|
12
|
+
export declare const Declaration: core.StcSignature<base.DeclarationProps>;
|
|
13
|
+
export declare const EnumDeclaration: core.StcSignature<base.EnumDeclarationProps>;
|
|
14
|
+
export declare const EnumMember: core.StcSignature<base.EnumMemberProps>;
|
|
15
|
+
export declare const ExportStatement: core.StcSignature<base.ExportStatementProps>;
|
|
16
|
+
export declare const FunctionCallExpression: core.StcSignature<base.FunctionCallExpressionProps>;
|
|
17
|
+
export declare const FunctionDeclaration: core.StcSignature<base.FunctionDeclarationProps>;
|
|
18
|
+
export declare const FunctionExpression: core.StcSignature<base.FunctionExpressionProps>;
|
|
19
|
+
export declare const IfStatement: core.StcSignature<base.IfStatementProps>;
|
|
20
|
+
export declare const ElseClause: core.StcSignature<base.ElseClauseProps>;
|
|
21
|
+
export declare const ElseIfClause: core.StcSignature<base.ElseIfClauseProps>;
|
|
22
|
+
export declare const ImportStatement: core.StcSignature<base.ImportStatementProps>;
|
|
23
|
+
export declare const ImportStatements: core.StcSignature<base.ImportStatementsProps>;
|
|
24
|
+
export declare const InterfaceDeclaration: core.StcSignature<base.InterfaceDeclarationProps>;
|
|
25
|
+
export declare const InterfaceExpression: core.StcSignature<base.InterfaceExpressionProps>;
|
|
26
|
+
export declare const InterfaceMember: core.StcSignature<base.InterfaceMemberProps>;
|
|
27
|
+
export declare const InterfaceMethod: core.StcSignature<base.InterfaceMethodProps>;
|
|
28
|
+
export declare const JSDoc: core.StcSignature<base.JSDocProps>;
|
|
29
|
+
export declare const JSDocExample: core.StcSignature<base.JSDocExampleProps>;
|
|
30
|
+
export declare const JSDocComment: core.StcSignature<base.JSDocCommentProps>;
|
|
31
|
+
export declare const MemberExpression: core.StcSignature<base.MemberExpressionProps>;
|
|
32
|
+
export declare const NewExpression: core.StcSignature<base.NewExpressionProps>;
|
|
33
|
+
export declare const ObjectExpression: core.StcSignature<base.ObjectExpressionProps>;
|
|
34
|
+
export declare const ObjectProperty: core.StcSignature<base.ObjectPropertyProps>;
|
|
35
|
+
export declare const PackageDirectory: core.StcSignature<base.PackageDirectoryProps>;
|
|
36
|
+
export declare const PackageJsonFile: core.StcSignature<base.PackageJsonFileProps>;
|
|
37
|
+
export declare const Reference: core.StcSignature<base.ReferenceProps>;
|
|
38
|
+
export declare const SourceFile: core.StcSignature<base.SourceFileProps>;
|
|
39
|
+
export declare const SwitchStatement: core.StcSignature<base.SwitchStatementProps>;
|
|
40
|
+
export declare const CaseClause: core.StcSignature<base.CaseClauseProps>;
|
|
41
|
+
export declare const TSConfigJson: core.StcSignature<base.TSConfigJsonProps>;
|
|
42
|
+
export declare const FunctionType: core.StcSignature<base.FunctionTypeProps>;
|
|
43
|
+
export declare const TypeDeclaration: core.StcSignature<base.TypeDeclarationProps>;
|
|
44
|
+
export declare const TypeRefContext: core.StcSignature<base.TypeRefContextProps>;
|
|
45
|
+
export declare const ValueExpression: core.StcSignature<base.ValueExpressionProps>;
|
|
46
|
+
export declare const VarDeclaration: core.StcSignature<base.VarDeclarationProps>;
|
|
45
47
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/stc/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAEpC,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/stc/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAEpC,eAAO,MAAM,eAAe,8CAAiC,CAAC;AAC9D,eAAO,MAAM,aAAa,4CAA+B,CAAC;AAC1D,eAAO,MAAM,UAAU,yCAA4B,CAAC;AACpD,eAAO,MAAM,aAAa,4CAA+B,CAAC;AAC1D,eAAO,MAAM,gBAAgB,+CAAkC,CAAC;AAChE,eAAO,MAAM,UAAU,yCAA4B,CAAC;AACpD,eAAO,MAAM,WAAW,0CAA6B,CAAC;AACtD,eAAO,MAAM,WAAW,0CAA6B,CAAC;AACtD,eAAO,MAAM,SAAS,wCAA2B,CAAC;AAClD,eAAO,MAAM,WAAW,0CAA6B,CAAC;AACtD,eAAO,MAAM,eAAe,8CAAiC,CAAC;AAC9D,eAAO,MAAM,UAAU,yCAA4B,CAAC;AACpD,eAAO,MAAM,eAAe,8CAAiC,CAAC;AAC9D,eAAO,MAAM,sBAAsB,qDAAwC,CAAC;AAC5E,eAAO,MAAM,mBAAmB,kDAAqC,CAAC;AACtE,eAAO,MAAM,kBAAkB,iDAAoC,CAAC;AACpE,eAAO,MAAM,WAAW,0CAA6B,CAAC;AACtD,eAAO,MAAM,UAAU,yCAA4B,CAAC;AACpD,eAAO,MAAM,YAAY,2CAA8B,CAAC;AACxD,eAAO,MAAM,eAAe,8CAAiC,CAAC;AAC9D,eAAO,MAAM,gBAAgB,+CAAkC,CAAC;AAChE,eAAO,MAAM,oBAAoB,mDAAsC,CAAC;AACxE,eAAO,MAAM,mBAAmB,kDAAqC,CAAC;AACtE,eAAO,MAAM,eAAe,8CAAiC,CAAC;AAC9D,eAAO,MAAM,eAAe,8CAAiC,CAAC;AAC9D,eAAO,MAAM,KAAK,oCAAuB,CAAC;AAC1C,eAAO,MAAM,YAAY,2CAA8B,CAAC;AACxD,eAAO,MAAM,YAAY,2CAA8B,CAAC;AACxD,eAAO,MAAM,gBAAgB,+CAAkC,CAAC;AAChE,eAAO,MAAM,aAAa,4CAA+B,CAAC;AAC1D,eAAO,MAAM,gBAAgB,+CAAkC,CAAC;AAChE,eAAO,MAAM,cAAc,6CAAgC,CAAC;AAC5D,eAAO,MAAM,gBAAgB,+CAAkC,CAAC;AAChE,eAAO,MAAM,eAAe,8CAAiC,CAAC;AAC9D,eAAO,MAAM,SAAS,wCAA2B,CAAC;AAClD,eAAO,MAAM,UAAU,yCAA4B,CAAC;AACpD,eAAO,MAAM,eAAe,8CAAiC,CAAC;AAC9D,eAAO,MAAM,UAAU,yCAA4B,CAAC;AACpD,eAAO,MAAM,YAAY,2CAA8B,CAAC;AACxD,eAAO,MAAM,YAAY,2CAA8B,CAAC;AACxD,eAAO,MAAM,eAAe,8CAAiC,CAAC;AAC9D,eAAO,MAAM,cAAc,6CAAgC,CAAC;AAC5D,eAAO,MAAM,eAAe,8CAAiC,CAAC;AAC9D,eAAO,MAAM,cAAc,6CAAgC,CAAC"}
|