MCPcopy Create free account
hub / github.com/nodejs/node / tryGetJsxCompletionSymbols

Function tryGetJsxCompletionSymbols

test/fixtures/snapshot/typescript.js:133853–133865  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

133851 return 1 /* GlobalsSearch.Success */;
133852 }
133853 function tryGetJsxCompletionSymbols() {
133854 var jsxContainer = tryGetContainingJsxElement(contextToken);
133855 // Cursor is inside a JSX self-closing element or opening element
133856 var attrsType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes);
133857 if (!attrsType)
133858 return 0 /* GlobalsSearch.Continue */;
133859 var completionsType = jsxContainer && typeChecker.getContextualType(jsxContainer.attributes, 4 /* ContextFlags.Completions */);
133860 symbols = ts.concatenate(symbols, filterJsxAttributes(getPropertiesForObjectExpression(attrsType, completionsType, jsxContainer.attributes, typeChecker), jsxContainer.attributes.properties));
133861 setSortTextToOptionalMember();
133862 completionKind = 3 /* CompletionKind.MemberLike */;
133863 isNewIdentifierLocation = false;
133864 return 1 /* GlobalsSearch.Success */;
133865 }
133866 function tryGetImportCompletionSymbols() {
133867 if (!importCompletionNode)
133868 return 0 /* GlobalsSearch.Continue */;

Callers 1

tryGetGlobalSymbolsFunction · 0.85

Calls 4

filterJsxAttributesFunction · 0.85

Tested by

no test coverage detected