@player-tools/xlr-converters 0.3.0-next.2 → 0.4.0--canary.25.709

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/index.cjs.js CHANGED
@@ -412,13 +412,7 @@ class TsConverter {
412
412
  }
413
413
  }
414
414
  const functionReturnType = this.context.typeChecker.getTypeAtLocation(functionCall);
415
- let syntheticNode = this.context.typeChecker.typeToTypeNode(functionReturnType, document, void 0);
416
- if (ts__default["default"].isArrowFunction(functionCall)) {
417
- const syntheticWithParameters = __spreadProps(__spreadValues$1({}, syntheticNode), {
418
- parameters: functionCall.parameters
419
- });
420
- syntheticNode = syntheticWithParameters;
421
- }
415
+ const syntheticNode = this.context.typeChecker.typeToTypeNode(functionReturnType, document, void 0);
422
416
  if (syntheticNode) {
423
417
  if (ts__default["default"].isTypeReferenceNode(syntheticNode) && ts__default["default"].isIdentifier(syntheticNode.typeName)) {
424
418
  const { typeName } = syntheticNode;
package/dist/index.esm.js CHANGED
@@ -404,13 +404,7 @@ class TsConverter {
404
404
  }
405
405
  }
406
406
  const functionReturnType = this.context.typeChecker.getTypeAtLocation(functionCall);
407
- let syntheticNode = this.context.typeChecker.typeToTypeNode(functionReturnType, document, void 0);
408
- if (ts.isArrowFunction(functionCall)) {
409
- const syntheticWithParameters = __spreadProps(__spreadValues$1({}, syntheticNode), {
410
- parameters: functionCall.parameters
411
- });
412
- syntheticNode = syntheticWithParameters;
413
- }
407
+ const syntheticNode = this.context.typeChecker.typeToTypeNode(functionReturnType, document, void 0);
414
408
  if (syntheticNode) {
415
409
  if (ts.isTypeReferenceNode(syntheticNode) && ts.isIdentifier(syntheticNode.typeName)) {
416
410
  const { typeName } = syntheticNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@player-tools/xlr-converters",
3
- "version": "0.3.0-next.2",
3
+ "version": "0.4.0--canary.25.709",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org"
@@ -9,8 +9,9 @@
9
9
  "typescript": "4.8.4"
10
10
  },
11
11
  "dependencies": {
12
- "@player-tools/xlr": "0.3.0-next.2",
13
- "@player-tools/xlr-utils": "0.3.0-next.2",
12
+ "@player-tools/xlr": "0.4.0--canary.25.709",
13
+ "@player-tools/xlr-utils": "0.4.0--canary.25.709",
14
+ "@typescript/vfs": "^1.4.0",
14
15
  "@babel/runtime": "7.15.4"
15
16
  },
16
17
  "main": "dist/index.cjs.js",
package/src/ts-to-xlr.ts CHANGED
@@ -629,22 +629,12 @@ export class TsConverter {
629
629
  const functionReturnType =
630
630
  this.context.typeChecker.getTypeAtLocation(functionCall);
631
631
 
632
- let syntheticNode = this.context.typeChecker.typeToTypeNode(
632
+ const syntheticNode = this.context.typeChecker.typeToTypeNode(
633
633
  functionReturnType,
634
634
  document,
635
635
  undefined
636
636
  );
637
637
 
638
- // Synthetic node loses parameter location information, and text making it unable
639
- // to get the parameter name in tsNodeToType
640
- if (ts.isArrowFunction(functionCall)) {
641
- const syntheticWithParameters = {
642
- ...syntheticNode,
643
- parameters: functionCall.parameters,
644
- };
645
- syntheticNode = syntheticWithParameters as unknown as ts.TypeNode;
646
- }
647
-
648
638
  if (syntheticNode) {
649
639
  if (
650
640
  ts.isTypeReferenceNode(syntheticNode) &&