TypeScript/tests/cases/fourslash/signatureHelpWithTriggers01.ts

32 lines
683 B
TypeScript
Raw Normal View History

2018-07-04 02:01:19 +02:00
/// <reference path="fourslash.ts" />
////declare function foo<T>(x: T, y: T): T;
////
////foo/*1*//*2*/;
////foo(/*3*/100/*4*/);
////foo/*5*//*6*/();
const charMap = {
1: "(",
2: "<",
3: ",",
4: ",",
5: "(",
6: "<",
}
for (const markerName of Object.keys(charMap)) {
const triggerCharacter = charMap[markerName];
goTo.marker(markerName);
edit.insert(triggerCharacter);
verify.signatureHelpPresentForTriggerReason({
kind: "characterTyped",
triggerCharacter,
});
verify.signatureHelpPresentForTriggerReason({
kind: "retrigger",
triggerCharacter,
});
edit.backspace(triggerCharacter.length);
}