···
? bubbleUpCallExpression(node)
: bubbleUpTemplate(node);
ts.isCallExpression(node) &&
···
const queryText = node.arguments[0].getText();
const fragments = getAllFragments(filename, node, info);
68
-
const cursor = new Cursor(foundToken.line, foundToken.start - 1);
69
-
const text = `${queryText}\m${fragments.map(x => print(x)).join('\n')}`;
71
-
const [suggestions, spreadSuggestions] = getSuggestionsInternal(
78
-
isGlobalCompletion: false,
79
-
isMemberCompletion: false,
80
-
isNewIdentifierLocation: false,
82
-
...suggestions.map(suggestion => ({
84
-
kind: ts.ScriptElementKind.variableElement,
85
-
name: suggestion.label,
86
-
kindModifiers: 'declare',
87
-
sortText: suggestion.sortText || '0',
89
-
detail: suggestion.type
90
-
? ' ' + suggestion.type?.toString()
92
-
description: suggestion.documentation,
95
-
...spreadSuggestions.map(suggestion => ({
97
-
kind: ts.ScriptElementKind.variableElement,
98
-
name: suggestion.label,
99
-
insertText: '...' + suggestion.label,
100
-
kindModifiers: 'declare',
103
-
description: suggestion.documentation,
70
+
text = `${queryText}\m${fragments.map(x => print(x)).join('\n')}`;
71
+
cursor = new Cursor(foundToken.line, foundToken.start - 1);
} else if (ts.isTaggedTemplateExpression(node)) {
const { template, tag } = node;
···
const foundToken = getToken(template, cursorPosition);
if (!foundToken || !schema.current) return undefined;
116
-
const { combinedText: text, resolvedSpans } = resolveTemplate(
80
+
const { combinedText, resolvedSpans } = resolveTemplate(
···
foundToken.line = foundToken.line + amountOfLines;
132
-
const cursor = new Cursor(foundToken.line, foundToken.start - 1);
134
-
const [suggestions, spreadSuggestions] = getSuggestionsInternal(
141
-
isGlobalCompletion: false,
142
-
isMemberCompletion: false,
143
-
isNewIdentifierLocation: false,
145
-
...suggestions.map(suggestion => ({
147
-
kind: ts.ScriptElementKind.variableElement,
148
-
name: suggestion.label,
149
-
kindModifiers: 'declare',
150
-
sortText: suggestion.sortText || '0',
152
-
detail: suggestion.type
153
-
? ' ' + suggestion.type?.toString()
155
-
description: suggestion.documentation,
158
-
...spreadSuggestions.map(suggestion => ({
160
-
kind: ts.ScriptElementKind.variableElement,
161
-
name: suggestion.label,
162
-
insertText: '...' + suggestion.label,
163
-
kindModifiers: 'declare',
166
-
description: suggestion.documentation,
96
+
text = combinedText;
97
+
cursor = new Cursor(foundToken.line, foundToken.start - 1);
102
+
const [suggestions, spreadSuggestions] = getSuggestionsInternal(
109
+
isGlobalCompletion: false,
110
+
isMemberCompletion: false,
111
+
isNewIdentifierLocation: false,
113
+
...suggestions.map(suggestion => ({
115
+
kind: ts.ScriptElementKind.variableElement,
116
+
name: suggestion.label,
117
+
kindModifiers: 'declare',
118
+
sortText: suggestion.sortText || '0',
120
+
detail: suggestion.type
121
+
? ' ' + suggestion.type?.toString()
123
+
description: suggestion.documentation,
126
+
...spreadSuggestions.map(suggestion => ({
128
+
kind: ts.ScriptElementKind.variableElement,
129
+
name: suggestion.label,
130
+
insertText: '...' + suggestion.label,
131
+
kindModifiers: 'declare',
134
+
description: suggestion.documentation,
export function getSuggestionsInternal(