Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Nov 9, 2024
1 parent ca9b829 commit a4ec1e9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 50 deletions.
29 changes: 2 additions & 27 deletions Source/Function/Output/Transformer/Visit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,33 +95,8 @@ class Track {
return false;
}

// If we have a current scope, check all usages are in same scope
if (_Node) {
let Node = _Node;

while (Node.parent) {
if (ts.isMethodDeclaration(Node.parent)) {
const Method = (Node.parent.name as Identifier)
.text;

let Overload = 0;

ts.forEachChild(Node.getSourceFile(), (node) => {
if (
ts.isMethodDeclaration(node) &&
(node.name as Identifier).text === Method
) {
Overload++;
}
});

if (Overload > 1) {
return false;
}
}

Node = Node.parent;
}

while (
_Node &&
!ts.isFunctionDeclaration(_Node) &&
Expand Down Expand Up @@ -155,7 +130,7 @@ class Track {
if (
ts.isArrayLiteralExpression(Result) ||
// ts.isAwaitExpression(Result) ||
ts.isMethodDeclaration(Result) ||
// ts.isMethodDeclaration(Result) ||
// ts.isFunctionDeclaration(Result) ||
ts.isBinaryExpression(Result) ||
// ts.isCallExpression(Result) ||
Expand Down
27 changes: 6 additions & 21 deletions Target/Function/Output/Transformer/Visit.js

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

Loading

0 comments on commit a4ec1e9

Please sign in to comment.