rbx-transformer-alpha 1.0.0 → 1.0.1
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/out/transformer.js +16 -17
- package/package.json +1 -1
package/out/transformer.js
CHANGED
|
@@ -42,23 +42,22 @@ function visitExpression(context, node) {
|
|
|
42
42
|
return context.transform(node);
|
|
43
43
|
}
|
|
44
44
|
function visitCallExpression(context, node) {
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
45
|
+
// const { factory } = context;
|
|
46
|
+
// const typeChecker = context.program.getTypeChecker();
|
|
47
|
+
// const expr = node.expression;
|
|
48
|
+
// if (expr.kind === ts.SyntaxKind.Identifier && (expr as ts.Identifier).text === "createNetworkEvents") {
|
|
49
|
+
// const typeArg = node.typeArguments?.[1];
|
|
50
|
+
// if (typeArg) {
|
|
51
|
+
// const type = typeChecker.getTypeFromTypeNode(typeArg);
|
|
52
|
+
// const properties = type.getProperties();
|
|
53
|
+
// const stringArgs = properties.map((prop) => factory.createStringLiteral(prop.getName()));
|
|
54
|
+
// const arrayLiteral = factory.createArrayLiteralExpression(stringArgs);
|
|
55
|
+
// return factory.updateCallExpression(node, node.expression, node.typeArguments, [
|
|
56
|
+
// ...node.arguments,
|
|
57
|
+
// arrayLiteral,
|
|
58
|
+
// ]);
|
|
59
|
+
// }
|
|
60
|
+
// }
|
|
62
61
|
return context.transform(node);
|
|
63
62
|
}
|
|
64
63
|
function visitNode(context, node) {
|