You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The interface for SignatureHelp (as of 3.15) says that signatures contains "one or more", but then activeSignature talks about signatures.length === 0.
export interface SignatureHelp {
/**
* One or more signatures.
*/
signatures: SignatureInformation[];
/**
* The active signature. If omitted or the value lies outside the
* range of `signatures` the value defaults to zero or is ignored if
* `signatures.length === 0`. [...]
*/
activeSignature?: number;
[...]
}
It also says "Signature help represents the signature of something callable" which suggests that when the Position is not something callable, the correct response is null, not { signatures: [] }.
If that's the case, I think the docs for activeSignature should not mention signatures.length === 0. Further, why would activeSignature ever be outside the range of signatures? It's confusing that it talks about all these invalid states.
The text was updated successfully, but these errors were encountered:
The reason why the spec talks about this is that clients receiving such a result has some reasonable hints what to do if it receives something that where active signature is outside the array.
I do agree if that this can be made more clear. I rephrases it a little.
The interface for
SignatureHelp
(as of 3.15) says thatsignatures
contains "one or more", but thenactiveSignature
talks aboutsignatures.length === 0
.It also says "Signature help represents the signature of something callable" which suggests that when the Position is not something callable, the correct response is
null
, not{ signatures: [] }
.If that's the case, I think the docs for
activeSignature
should not mentionsignatures.length === 0
. Further, why wouldactiveSignature
ever be outside the range ofsignatures
? It's confusing that it talks about all these invalid states.The text was updated successfully, but these errors were encountered: