Don't include this function types in completeFunctionCall (#195)

This commit is contained in:
Duc Nghiem Xuan 2020-08-20 21:17:04 +09:00 committed by GitHub
parent 47d3dba90a
commit e4f3ab555b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -211,7 +211,9 @@ export function getParameterListParts(
const next = displayParts[i + 1] const next = displayParts[i + 1]
// Skip optional parameters // Skip optional parameters
const nameIsFollowedByOptionalIndicator = next && next.text === '?' const nameIsFollowedByOptionalIndicator = next && next.text === '?'
if (!nameIsFollowedByOptionalIndicator) { // Skip this parameter
const nameIsThis = part.text === 'this'
if (!nameIsFollowedByOptionalIndicator && !nameIsThis) {
parts.push(part) parts.push(part)
} }
hasOptionalParameters = hasOptionalParameters || nameIsFollowedByOptionalIndicator hasOptionalParameters = hasOptionalParameters || nameIsFollowedByOptionalIndicator