@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-package.d.ts","sourceRoot":"","sources":["../../src/create-package.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,MAAM,
|
|
1
|
+
{"version":3,"file":"create-package.d.ts","sourceRoot":"","sources":["../../src/create-package.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,MAAM,EAEX,aAAa,EACd,MAAM,gBAAgB,CAAC;AAQxB,MAAM,WAAW,iBAAiB;IAChC,CAAC,IAAI,EAAE,MAAM,GAAG,uBAAuB,CAAC;CACzC;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,qBAAqB,GAC7B,MAAM,GACN;IACE,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAC7C,eAAe,CAAC,EAAE,KAAK,CAAC,qBAA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AAM,CAAC,GAAG,MAAM;CACpD,GAAG;KAED,CAAC,IAAI,OAAO,CACX,WAAW,CAAC,MAAM,CAAC,EACnB;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CACjB,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG;QACxB,MAAM,EAAE,CAAC,SAAS,CAChB;YAAE,aAAa,EAAE,MAAM,EAAE,SAAS,qBAAqB,EAAE,CAAA;SAAE,CAC5D,GACC,QAAQ,CAAC,EAAE,CAAC,GACZ,EAAE,CAAC;QACL,QAAQ,EAAE,CAAC,SAAS,CAClB;YAAE,eAAe,EAAE,MAAM,EAAE,SAAS,qBAAqB,EAAE,CAAA;SAAE,CAC9D,GACC,QAAQ,CAAC,EAAE,CAAC,GACZ,EAAE,CAAC;KACN;CACF,CAAC;AA0KJ,wBAAgB,aAAa,CAAC,KAAK,CAAC,CAAC,SAAS,iBAAiB,EAC7D,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAC3B,cAAc,CAAC,CAAC,CAAC,GAAG,aAAa,CA6DnC"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -4,5 +4,7 @@ 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";
|
|
8
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oBAAoB,CAAC"}
|
package/dist/src/index.js
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";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameter-descriptor.d.ts","sourceRoot":"","sources":["../../src/parameter-descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"parameter-descriptor.d.ts","sourceRoot":"","sources":["../../src/parameter-descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAEpC;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAE5B;;;;;;;OAOG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAExB;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE5C;;OAEG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,uBAAuB;IAClE;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,+BACf,SAAQ,uBAAuB;CAAG;AAEpC;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAEpC;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC7C"}
|
package/dist/src/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"values.test.d.ts","sourceRoot":"","sources":["../../test/values.test.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"values.test.d.ts","sourceRoot":"","sources":["../../test/values.test.tsx"],"names":[],"mappings":"AAWA,OAAO,wBAAwB,CAAC"}
|
package/dist/test/values.test.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createComponent as _$createComponent, createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
|
|
2
|
-
import { mapJoin, Output, printTree, reactive, refkey, render, renderTree, StatementList } from "@alloy-js/core";
|
|
2
|
+
import { List, mapJoin, Output, printTree, reactive, refkey, render, renderTree, StatementList } from "@alloy-js/core";
|
|
3
3
|
import "@alloy-js/core/testing";
|
|
4
4
|
import { describe, expect, it } from "vitest";
|
|
5
5
|
import { d } from "@alloy-js/core/testing";
|
|
@@ -348,4 +348,51 @@ describe("symbols", () => {
|
|
|
348
348
|
`
|
|
349
349
|
});
|
|
350
350
|
});
|
|
351
|
+
it("uses name policy", () => {
|
|
352
|
+
const key1 = refkey();
|
|
353
|
+
const res = render(_$createComponent(Output, {
|
|
354
|
+
get namePolicy() {
|
|
355
|
+
return ts.createTSNamePolicy();
|
|
356
|
+
},
|
|
357
|
+
get children() {
|
|
358
|
+
return _$createComponent(ts.SourceFile, {
|
|
359
|
+
path: "test.ts",
|
|
360
|
+
get children() {
|
|
361
|
+
return [_$createComponent(ts.VarDeclaration, {
|
|
362
|
+
"const": true,
|
|
363
|
+
name: "dispatcher",
|
|
364
|
+
get children() {
|
|
365
|
+
return _$createComponent(ts.ObjectExpression, {
|
|
366
|
+
get children() {
|
|
367
|
+
return _$createComponent(List, {
|
|
368
|
+
comma: true,
|
|
369
|
+
enderPunctuation: true,
|
|
370
|
+
get children() {
|
|
371
|
+
return _$createComponent(ts.ObjectProperty, {
|
|
372
|
+
name: "foo_bar",
|
|
373
|
+
value: "null",
|
|
374
|
+
refkey: key1
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
}), _$createIntrinsic("line", {}), _$createComponent(ts.FunctionCallExpression, {
|
|
382
|
+
target: key1,
|
|
383
|
+
args: ["data"]
|
|
384
|
+
})];
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
}));
|
|
389
|
+
assertFileContents(res, {
|
|
390
|
+
"test.ts": `
|
|
391
|
+
const dispatcher = {
|
|
392
|
+
fooBar: null,
|
|
393
|
+
}
|
|
394
|
+
dispatcher.fooBar(data)
|
|
395
|
+
`
|
|
396
|
+
});
|
|
397
|
+
});
|
|
351
398
|
});
|