@alloy-js/typescript 0.17.0 → 0.18.0-dev.4
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/dist/src/builtins/node.d.ts +4 -3
- 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 +4 -4
- package/dist/src/components/ArrowFunction.d.ts.map +1 -1
- package/dist/src/components/BarrelFile.d.ts +1 -1
- package/dist/src/components/BarrelFile.d.ts.map +1 -1
- package/dist/src/components/BlockScope.d.ts +1 -1
- package/dist/src/components/BlockScope.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/EnumDeclaration.d.ts +1 -1
- package/dist/src/components/EnumDeclaration.d.ts.map +1 -1
- 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 +5 -5
- package/dist/src/components/FunctionBase.d.ts.map +1 -1
- package/dist/src/components/FunctionDeclaration.d.ts +4 -4
- package/dist/src/components/FunctionDeclaration.d.ts.map +1 -1
- package/dist/src/components/FunctionExpression.d.ts +4 -4
- package/dist/src/components/FunctionExpression.d.ts.map +1 -1
- package/dist/src/components/FunctionType.d.ts +3 -3
- 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 +1 -1
- package/dist/src/components/ImportStatement.d.ts.map +1 -1
- package/dist/src/components/InterfaceMethod.d.ts +3 -4
- 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 +1 -1
- package/dist/src/components/MemberDeclaration.d.ts.map +1 -1
- package/dist/src/components/NewExpression.d.ts +1 -1
- package/dist/src/components/NewExpression.d.ts.map +1 -1
- package/dist/src/components/ObjectExpression.js +4 -4
- package/dist/src/components/PackageJson.d.ts +1 -1
- package/dist/src/components/PackageJson.d.ts.map +1 -1
- package/dist/src/components/PropertyName.d.ts +1 -1
- package/dist/src/components/PropertyName.d.ts.map +1 -1
- package/dist/src/components/Reference.d.ts +1 -1
- package/dist/src/components/Reference.d.ts.map +1 -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/SwitchStatement.d.ts +1 -1
- package/dist/src/components/SwitchStatement.d.ts.map +1 -1
- package/dist/src/components/TsConfigJson.d.ts +1 -1
- package/dist/src/components/TsConfigJson.d.ts.map +1 -1
- package/dist/src/components/TypeDeclaration.d.ts +1 -1
- package/dist/src/components/TypeDeclaration.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/create-package.d.ts +1 -1
- package/dist/src/create-package.d.ts.map +1 -1
- 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/utils.js +1 -1
- package/dist/test/values.test.d.ts.map +1 -1
- package/dist/test/values.test.js +48 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/src/builtins/node.ts +4 -0
- package/src/components/ArrowFunction.tsx +1 -1
- package/src/components/CallSignature.tsx +1 -1
- package/src/components/FunctionBase.tsx +1 -1
- 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/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/ObjectExpression.tsx +4 -4
- package/src/components/SingleLineCommentBlock.tsx +1 -2
- package/src/components/SourceFile.tsx +1 -1
- package/src/components/SwitchStatement.tsx +1 -2
- package/src/components/TypeRefContext.tsx +1 -1
- package/src/create-package.ts +2 -2
- package/src/index.ts +2 -0
- package/src/parameter-descriptor.ts +1 -1
- package/src/utils.ts +1 -1
- package/temp/api.json +145 -39
- package/test/values.test.tsx +33 -0
- package/tsconfig.json +2 -1
- package/dist/test/vitest.d.js +0 -1
- package/test/vitest.d.ts +0 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alloy-js/typescript",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0-dev.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -14,18 +14,18 @@
|
|
|
14
14
|
"author": "brian.terlson@microsoft.com",
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"dependencies": {
|
|
17
|
+
"@alloy-js/core": "~0.17.0 || >= 0.18.0-dev.3",
|
|
17
18
|
"change-case": "^5.4.4",
|
|
18
|
-
"pathe": "^2.0.3"
|
|
19
|
-
"@alloy-js/core": "~0.17.0"
|
|
19
|
+
"pathe": "^2.0.3"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
+
"@alloy-js/cli": "~0.17.0 || >= 0.18.0-dev.0",
|
|
23
|
+
"@alloy-js/rollup-plugin": "~0.1.0 || >= 0.1.1-dev.0",
|
|
22
24
|
"@microsoft/api-extractor": "~7.52.8",
|
|
23
25
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
24
26
|
"concurrently": "^9.1.2",
|
|
25
27
|
"typescript": "^5.8.3",
|
|
26
|
-
"vitest": "^3.1.1"
|
|
27
|
-
"@alloy-js/cli": "~0.17.0",
|
|
28
|
-
"@alloy-js/rollup-plugin": "~0.1.0"
|
|
28
|
+
"vitest": "^3.1.1"
|
|
29
29
|
},
|
|
30
30
|
"type": "module",
|
|
31
31
|
"scripts": {
|
package/src/builtins/node.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { SymbolCreator } from "@alloy-js/core";
|
|
1
2
|
import { createPackage } from "../create-package.js";
|
|
2
3
|
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5
|
+
type dummy = SymbolCreator;
|
|
6
|
+
|
|
3
7
|
export const path = createPackage({
|
|
4
8
|
name: "node:path",
|
|
5
9
|
version: "22.5.1",
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
findKeyedChild,
|
|
4
4
|
findUnkeyedChildren,
|
|
5
5
|
Scope,
|
|
6
|
+
type Children,
|
|
6
7
|
} from "@alloy-js/core";
|
|
7
|
-
import { Children } from "@alloy-js/core/jsx-runtime";
|
|
8
8
|
import { getCallSignatureProps } from "../utils.js";
|
|
9
9
|
import { CallSignature, CallSignatureProps } from "./CallSignature.jsx";
|
|
10
10
|
import { Declaration } from "./Declaration.jsx";
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
onCleanup,
|
|
8
8
|
Show,
|
|
9
9
|
taggedComponent,
|
|
10
|
+
type Children,
|
|
10
11
|
} from "@alloy-js/core";
|
|
11
|
-
import type { Children } from "@alloy-js/core/jsx-runtime";
|
|
12
12
|
import { useTSNamePolicy } from "../name-policy.js";
|
|
13
13
|
import type {
|
|
14
14
|
FunctionTypeParameterDescriptor,
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
Prose,
|
|
7
7
|
Scope,
|
|
8
8
|
Show,
|
|
9
|
+
type Children,
|
|
9
10
|
} from "@alloy-js/core";
|
|
10
|
-
import { Children } from "@alloy-js/core/jsx-runtime";
|
|
11
11
|
import { getCallSignatureProps } from "../utils.js";
|
|
12
12
|
import { CallSignature, CallSignatureProps } from "./CallSignature.jsx";
|
|
13
13
|
import { BaseDeclarationProps, Declaration } from "./Declaration.js";
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
findKeyedChild,
|
|
4
4
|
findUnkeyedChildren,
|
|
5
5
|
Scope,
|
|
6
|
+
type Children,
|
|
6
7
|
} from "@alloy-js/core";
|
|
7
|
-
import { Children } from "@alloy-js/core/jsx-runtime";
|
|
8
8
|
import { getCallSignatureProps } from "../utils.js";
|
|
9
9
|
import { CallSignature, CallSignatureProps } from "./CallSignature.jsx";
|
|
10
10
|
import { Declaration } from "./Declaration.jsx";
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
Prose,
|
|
5
5
|
Scope,
|
|
6
6
|
Show,
|
|
7
|
+
type Children,
|
|
7
8
|
} from "@alloy-js/core";
|
|
8
|
-
import { Children } from "@alloy-js/core/jsx-runtime";
|
|
9
9
|
import { getCallSignatureProps } from "../utils.js";
|
|
10
10
|
import { CallSignature, CallSignatureProps } from "./CallSignature.jsx";
|
|
11
11
|
import {
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
Refkey,
|
|
7
7
|
Scope,
|
|
8
8
|
Show,
|
|
9
|
+
type Children,
|
|
9
10
|
} from "@alloy-js/core";
|
|
10
|
-
import { Children } from "@alloy-js/core/jsx-runtime";
|
|
11
11
|
import { useTSNamePolicy } from "../name-policy.js";
|
|
12
12
|
import { getCallSignatureProps } from "../utils.js";
|
|
13
13
|
import { CallSignature, CallSignatureProps } from "./CallSignature.jsx";
|
package/src/components/JSDoc.tsx
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { For, Prose, Show } from "@alloy-js/core";
|
|
2
|
-
import { Children } from "@alloy-js/core/jsx-runtime";
|
|
1
|
+
import { For, Prose, Show, type Children } from "@alloy-js/core";
|
|
3
2
|
import { ParameterDescriptor } from "../parameter-descriptor.js";
|
|
4
3
|
|
|
5
4
|
export interface JSDocParamsProps {
|
|
@@ -95,11 +95,11 @@ export interface ObjectPropertyProps {
|
|
|
95
95
|
|
|
96
96
|
export function ObjectProperty(props: ObjectPropertyProps) {
|
|
97
97
|
let name;
|
|
98
|
+
let symbolName = props.name;
|
|
98
99
|
if (props.name) {
|
|
99
100
|
const namer = useTSNamePolicy();
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
);
|
|
101
|
+
symbolName = namer.getName(props.name, "object-member-data");
|
|
102
|
+
name = <PropertyName name={symbolName} />;
|
|
103
103
|
} else if (props.nameExpression) {
|
|
104
104
|
name = <>[{props.nameExpression}]</>;
|
|
105
105
|
} else {
|
|
@@ -108,7 +108,7 @@ export function ObjectProperty(props: ObjectPropertyProps) {
|
|
|
108
108
|
|
|
109
109
|
let sym = undefined;
|
|
110
110
|
if (props.refkey && props.name) {
|
|
111
|
-
sym = new TSOutputSymbol(
|
|
111
|
+
sym = new TSOutputSymbol(symbolName!, {
|
|
112
112
|
refkeys: props.refkey,
|
|
113
113
|
flags: OutputSymbolFlags.StaticMember,
|
|
114
114
|
});
|
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
Show,
|
|
7
7
|
SourceDirectoryContext,
|
|
8
8
|
useContext,
|
|
9
|
+
type Children,
|
|
9
10
|
} from "@alloy-js/core";
|
|
10
11
|
|
|
11
|
-
import { Children } from "@alloy-js/core/jsx-runtime";
|
|
12
12
|
import { join } from "pathe";
|
|
13
13
|
import { getSourceDirectoryData } from "../source-directory-data.js";
|
|
14
14
|
import { TSModuleScope } from "../symbols/index.js";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Block, Indent, Match, Switch } from "@alloy-js/core";
|
|
2
|
-
import { Children } from "@alloy-js/core/jsx-runtime";
|
|
1
|
+
import { Block, Indent, Match, Switch, type Children } from "@alloy-js/core";
|
|
3
2
|
import { BlockScope } from "./BlockScope.jsx";
|
|
4
3
|
import { ValueExpression } from "./ValueExpression.jsx";
|
|
5
4
|
|
package/src/create-package.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -4,4 +4,6 @@ export * from "./context/index.js";
|
|
|
4
4
|
export * from "./create-package.js";
|
|
5
5
|
export * from "./name-conflict-resolver.js";
|
|
6
6
|
export * from "./name-policy.js";
|
|
7
|
+
export * from "./parameter-descriptor.js";
|
|
8
|
+
export * from "./source-directory-data.js";
|
|
7
9
|
export * from "./symbols/index.js";
|
package/src/utils.ts
CHANGED