Begin packaging of signature help items
This commit is contained in:
parent
67516a1f61
commit
d42c5ba86c
2 changed files with 11 additions and 2 deletions
|
@ -3542,6 +3542,15 @@ module ts {
|
|||
return undefined;
|
||||
}
|
||||
|
||||
function getSignatureHelpItemsFromCandidateInfo(candidates: Signature[], bestSignature: Signature): SignatureHelpItems {
|
||||
var items = map(candidates, candidateSignature => {
|
||||
return new SignatureHelpItem(false, "", "", "", new Array<SignatureHelpParameter>(candidateSignature.parameters.length), "");
|
||||
});
|
||||
var selectedItemIndex = candidates.indexOf(bestSignature);
|
||||
Debug.assert(selectedItemIndex >= 0);
|
||||
return new SignatureHelpItems(items, undefined, selectedItemIndex);
|
||||
}
|
||||
|
||||
synchronizeHostData();
|
||||
|
||||
// Decide whether to show signature help
|
||||
|
@ -3556,7 +3565,7 @@ module ts {
|
|||
var candidates = <Signature[]>[];
|
||||
var resolvedSignature = typeInfoResolver.getResolvedSignature(call, candidates);
|
||||
return candidates.length
|
||||
? new SignatureHelpItems(new Array<SignatureHelpItem>(candidates.length), undefined, undefined)
|
||||
? getSignatureHelpItemsFromCandidateInfo(candidates, resolvedSignature)
|
||||
: undefined;
|
||||
}
|
||||
|
||||
|
|
|
@ -295,7 +295,7 @@ module FourSlashInterface {
|
|||
}
|
||||
|
||||
public currentSignatureParamterCountIs(expected: number) {
|
||||
// FourSlash.currentTestState.verifyCurrentSignatureHelpParameterCount(expected);
|
||||
FourSlash.currentTestState.verifyCurrentSignatureHelpParameterCount(expected);
|
||||
}
|
||||
|
||||
public currentSignatureTypeParamterCountIs(expected: number) {
|
||||
|
|
Loading…
Reference in a new issue