mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Handle union properties completions on apparant types
This commit is contained in:
@@ -7916,7 +7916,7 @@ module ts {
|
||||
var symbols: Symbol[] = [];
|
||||
var name = symbol.name;
|
||||
forEach(getSymbolLinks(symbol).unionType.types, t => {
|
||||
symbols.push(getPropertyOfType(t, name));
|
||||
symbols.push(getPropertyOfType(getApparentType(t), name));
|
||||
});
|
||||
return symbols;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
///<reference path="fourslash.ts" />
|
||||
|
||||
////interface One {
|
||||
//// commonProperty: number;
|
||||
//// commonFunction(): number;
|
||||
////}
|
||||
////
|
||||
////interface Two {
|
||||
//// commonProperty: string
|
||||
//// commonFunction(): number;
|
||||
////}
|
||||
////
|
||||
////var x : One | Two;
|
||||
////
|
||||
////x.commonProperty./**/
|
||||
|
||||
goTo.marker();
|
||||
verify.memberListContains("toString", "() => string", undefined, undefined, "method");
|
||||
verify.memberListCount(1);
|
||||
Reference in New Issue
Block a user