mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Merge pull request #1443 from Microsoft/improvedTypeInference
Make initial inferences from parameterless function expressions
This commit is contained in:
commit
b2a02fe9ef
5 files changed
+66
-8
No files matched your search
@@ -3355,7 +3355,7 @@ module ts {
|
||||
}
|
||||
|
||||
function isContextSensitiveFunctionLikeDeclaration(node: FunctionLikeDeclaration) {
|
||||
return !node.typeParameters && !forEach(node.parameters, p => p.type);
|
||||
return !node.typeParameters && node.parameters.length && !forEach(node.parameters, p => p.type);
|
||||
}
|
||||
|
||||
function getTypeWithoutConstructors(type: Type): Type {
|
||||
|
||||
Reference in new issue
Block a user