Skip to content

Commit 87f1a33

Browse files
committed
fix errors that should not be here actually
1 parent 5cf98aa commit 87f1a33

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

src/apiCommands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const sharedApiRequest = async (type: TriggerCharacterCommand, { offset,
2727
if (!position) offset ??= document.offsetAt(activeTextEditor!.selection.active) + relativeOffset
2828
const requestOffset = offset ?? document.offsetAt(position!)
2929
const requestPos = position ?? document.positionAt(offset!)
30-
const getData = async () => sendCommand(type, { document: document!, position: requestPos })
30+
const getData = async () => sendCommand(type, { document: document!, position: requestPos, inputOptions: {} })
3131
const CACHE_UNDEFINED_TIMEOUT = 1000
3232
if (cacheableCommands.has(type as any)) {
3333
const cacheEntry = operationsCache.get(type)

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export const activateTsPlugin = (tsApi: { configurePlugin; onCompletionAccepted
8080
if (!webWaitingForConfigSync) return
8181
// webWaitingForConfigSync = false
8282
const config = getResolvedConfig()
83-
void sendCommand(`updateConfig${JSON.stringify(config)}` as any)
83+
void sendCommand(`updateConfig${JSON.stringify(config)}` as any, { inputOptions: {} })
8484
}
8585

8686
vscode.window.onDidChangeActiveTextEditor(possiblySyncConfig)

src/onCompletionAccepted.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export default (tsApi: { onCompletionAccepted }) => {
9292
undoStopBefore: false,
9393
})
9494
}
95+
9596
if (vscode.workspace.getConfiguration('editor.parameterHints').get('enabled') && params.length > 0) {
9697
void vscode.commands.executeCommand('editor.action.triggerParameterHints')
9798
}

src/specialCommands.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export default () => {
3434
const getCurrentValueRange = async () => {
3535
const editor = getActiveRegularEditor()
3636
if (!editor) return
37-
const result = await sendCommand('getRangeOfSpecialValue')
37+
const result = await sendCommand('getRangeOfSpecialValue', {})
3838
if (!result) return
3939
const range = tsRangeToVscode(editor.document, result.range)
4040
return range.with({ start: range.start.translate(0, / *{?/.exec(editor.document.lineAt(range.start).text.slice(range.start.character))![0]!.length) })
@@ -118,7 +118,7 @@ export default () => {
118118
registerExtensionCommand('pickAndInsertFunctionArguments', async () => {
119119
const editor = getActiveRegularEditor()
120120
if (!editor) return
121-
const result = await sendCommand('pickAndInsertFunctionArguments')
121+
const result = await sendCommand('pickAndInsertFunctionArguments', {})
122122
if (!result) return
123123

124124
const renderArgs = (args: Array<[name: string, type: string]>) => `${args.map(([name, type]) => (type ? `${name}: ${type}` : name)).join(', ')}`
@@ -162,7 +162,7 @@ export default () => {
162162
const editor = vscode.window.activeTextEditor
163163
if (!editor) return
164164
const { document } = editor
165-
const result = await sendCommand('filterBySyntaxKind')
165+
const result = await sendCommand('filterBySyntaxKind', {})
166166
if (!result) return
167167
// todo optimize
168168
if (filterWithSelection) {
@@ -241,7 +241,7 @@ export default () => {
241241
const editor = vscode.window.activeTextEditor
242242
if (!editor) return
243243
if (!getExtensionSetting('experiments.enableInsertNameOfSuggestionFix') && editor.document.languageId !== 'vue') {
244-
const result = await sendCommand('getLastResolvedCompletion')
244+
const result = await sendCommand('getLastResolvedCompletion', {})
245245
if (!result) return
246246
const position = editor.selection.active
247247
const range = result.range ? tsRangeToVscode(editor.document, result.range) : editor.document.getWordRangeAtPosition(position)
@@ -280,14 +280,14 @@ export default () => {
280280
})
281281

282282
registerExtensionCommand('copyFullType', async () => {
283-
const response = await sendCommand('getFullType')
283+
const response = await sendCommand('getFullType', {})
284284
if (!response) return
285285
const { text } = response
286286
await vscode.env.clipboard.writeText(text)
287287
})
288288

289289
registerExtensionCommand('getArgumentReferencesFromCurrentParameter', async () => {
290-
const result = await sendCommand('getArgumentReferencesFromCurrentParameter')
290+
const result = await sendCommand('getArgumentReferencesFromCurrentParameter', {})
291291
if (!result) return
292292
const editor = vscode.window.activeTextEditor!
293293
const { uri } = editor.document

0 commit comments

Comments
 (0)