Skip to content

Commit

Permalink
Don't include this function types in completeFunctionCall (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuanduc987 authored Aug 20, 2020
1 parent 47d3dba commit e4f3ab5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/server/utils/completionItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ export function getParameterListParts(
const next = displayParts[i + 1]
// Skip optional parameters
const nameIsFollowedByOptionalIndicator = next && next.text === '?'
if (!nameIsFollowedByOptionalIndicator) {
// Skip this parameter
const nameIsThis = part.text === 'this'
if (!nameIsFollowedByOptionalIndicator && !nameIsThis) {
parts.push(part)
}
hasOptionalParameters = hasOptionalParameters || nameIsFollowedByOptionalIndicator
Expand Down

0 comments on commit e4f3ab5

Please sign in to comment.