(members, enclosingDeclaration)
| 134127 | } |
| 134128 | /* Mutates `symbols` and `symbolToOriginInfoMap`. */ |
| 134129 | function collectObjectLiteralMethodSymbols(members, enclosingDeclaration) { |
| 134130 | // TODO: support JS files. |
| 134131 | if (ts.isInJSFile(location)) { |
| 134132 | return; |
| 134133 | } |
| 134134 | members.forEach(function (member) { |
| 134135 | if (!isObjectLiteralMethodSymbol(member)) { |
| 134136 | return; |
| 134137 | } |
| 134138 | var displayName = getCompletionEntryDisplayNameForSymbol(member, ts.getEmitScriptTarget(compilerOptions), |
| 134139 | /*origin*/ undefined, 0 /* CompletionKind.ObjectPropertyDeclaration */, |
| 134140 | /*jsxIdentifierExpected*/ false); |
| 134141 | if (!displayName) { |
| 134142 | return; |
| 134143 | } |
| 134144 | var name = displayName.name; |
| 134145 | var entryProps = getEntryForObjectLiteralMethodCompletion(member, name, enclosingDeclaration, program, host, compilerOptions, preferences, formatContext); |
| 134146 | if (!entryProps) { |
| 134147 | return; |
| 134148 | } |
| 134149 | var origin = __assign({ kind: 128 /* SymbolOriginInfoKind.ObjectLiteralMethod */ }, entryProps); |
| 134150 | flags |= 32 /* CompletionInfoFlags.MayIncludeMethodSnippets */; |
| 134151 | symbolToOriginInfoMap[symbols.length] = origin; |
| 134152 | symbols.push(member); |
| 134153 | }); |
| 134154 | } |
| 134155 | function isObjectLiteralMethodSymbol(symbol) { |
| 134156 | /* |
| 134157 | For an object type |
no test coverage detected