Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(map): add Map support as a type #228

Merged
merged 5 commits into from
Feb 8, 2020

Conversation

Pmyl
Copy link
Collaborator

@Pmyl Pmyl commented Feb 8, 2020

Also changed a linting rule for indentation, remove some code regarding typescript types, fixed a bug when using typeof variable without type and function call initializer and removed descriptor 'case' for function call

Also changed a linting rule for indentation, remove some code regarding typescript types, fixed a bug when using typeof variable without type and function call initializer and removed descriptor 'case' for function call
@Pmyl Pmyl changed the title #225 add Map support as a type feat(map): add Map support as a type Feb 8, 2020
@@ -62,5 +58,10 @@ export function GetType(node: ts.Node, scope: Scope): ts.Node {
return GetType(node.type, scope);
}

if (ts.isCallExpression(node)) {
const declaration: ts.Declaration = TypescriptHelper.GetDeclarationFromNode(node.expression);
return GetType(GetReturnNodeFromBody(declaration as ts.FunctionDeclaration), scope);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may want to add some test for when is not a function declaration .

a = test()
}

const test = () => {
  return 'ss'
}```

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no casting anymore, the change is quite big actually

@uittorio uittorio merged commit 3006c84 into master Feb 8, 2020
@uittorio uittorio deleted the #225_support_typescript_map_type branch March 3, 2020 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants