Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update getAugmentedPropertiesOfType
  • Loading branch information
ahejlsberg committed Sep 11, 2018
commit d069da2f66334a4ea65d5ed30831ee46dbde1817
7 changes: 5 additions & 2 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27758,8 +27758,11 @@ namespace ts {
function getAugmentedPropertiesOfType(type: Type): Symbol[] {
type = getApparentType(type);
const propsByName = createSymbolTable(getPropertiesOfType(type));
if (typeHasCallOrConstructSignatures(type)) {
forEach(getPropertiesOfType(globalFunctionType), p => {
const functionType = getSignaturesOfType(type, SignatureKind.Call).length ? globalCallableFunctionType :
getSignaturesOfType(type, SignatureKind.Call).length ? globalNewableFunctionType :
undefined;
if (functionType) {
forEach(getPropertiesOfType(functionType), p => {
if (!propsByName.has(p.escapedName)) {
propsByName.set(p.escapedName, p);
}
Expand Down