Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Oct 28, 2024
1 parent ba9969f commit d4202e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 27 deletions.
32 changes: 6 additions & 26 deletions Source/Function/Output/Transformer/Visit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,11 @@ import type Interface from "@Interface/Output/Transformer/Visit.js";
export const Fn = ((Usage, Initializer) =>
(...[Context]) =>
(...[Node]) => {
// Node = ;

if (ts.isVariableStatement(Node)) {
// // const declarations = Node.declarationList.declarations.filter(
// // (Declaration) => {
// // return (Usage.get(Declaration.name.getText()) ?? 0) > 1;
// // },
// // );
// // if (declarations.length === 0) {
// // return ts.factory.createEmptyStatement();
// // }
// // return ts.factory.updateVariableStatement(
// // Node,
// // Node.modifiers,
// // ts.factory.updateVariableDeclarationList(
// // Node.declarationList,
// // declarations,
// // ),
// // );
console.log(Node.getText());
}
Node = ts.visitEachChild(
Node,
Fn(Usage, Initializer)(Context),
Context,
);

if (ts.isIdentifier(Node)) {
const NameNode = Node.getText();
Expand All @@ -46,11 +30,7 @@ export const Fn = ((Usage, Initializer) =>
}
}

return ts.visitEachChild(
Node,
Fn(Usage, Initializer)(Context),
Context,
);
return Node;
}) satisfies Interface as Interface;

export const { default: ts } = await import("typescript");
Expand Down
2 changes: 1 addition & 1 deletion Target/Function/Output/Transformer/Visit.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d4202e8

Please sign in to comment.