(symbol, location)
| 132566 | }; |
| 132567 | } |
| 132568 | function isClassLikeMemberCompletion(symbol, location) { |
| 132569 | // TODO: support JS files. |
| 132570 | if (ts.isInJSFile(location)) { |
| 132571 | return false; |
| 132572 | } |
| 132573 | // Completion symbol must be for a class member. |
| 132574 | var memberFlags = 106500 /* SymbolFlags.ClassMember */ |
| 132575 | & 900095 /* SymbolFlags.EnumMemberExcludes */; |
| 132576 | /* In |
| 132577 | `class C { |
| 132578 | | |
| 132579 | }` |
| 132580 | `location` is a class-like declaration. |
| 132581 | In |
| 132582 | `class C { |
| 132583 | m| |
| 132584 | }` |
| 132585 | `location` is an identifier, |
| 132586 | `location.parent` is a class element declaration, |
| 132587 | and `location.parent.parent` is a class-like declaration. |
| 132588 | In |
| 132589 | `abstract class C { |
| 132590 | abstract |
| 132591 | abstract m| |
| 132592 | }` |
| 132593 | `location` is a syntax list (with modifiers as children), |
| 132594 | and `location.parent` is a class-like declaration. |
| 132595 | */ |
| 132596 | return !!(symbol.flags & memberFlags) && |
| 132597 | (ts.isClassLike(location) || |
| 132598 | (location.parent && |
| 132599 | location.parent.parent && |
| 132600 | ts.isClassElement(location.parent) && |
| 132601 | location === location.parent.name && |
| 132602 | ts.isClassLike(location.parent.parent)) || |
| 132603 | (location.parent && |
| 132604 | ts.isSyntaxList(location) && |
| 132605 | ts.isClassLike(location.parent))); |
| 132606 | } |
| 132607 | function getEntryForMemberCompletion(host, program, options, preferences, name, symbol, location, contextToken, formatContext) { |
| 132608 | var classLikeDeclaration = ts.findAncestor(location, ts.isClassLike); |
| 132609 | if (!classLikeDeclaration) { |
no outgoing calls
no test coverage detected