@@ -139,7 +139,6 @@ declare namespace FourSlashInterface {
139139 file ( name : string , content ?: string , scriptKindName ?: string ) : any ;
140140 select ( startMarker : string , endMarker : string ) : void ;
141141 selectRange ( range : Range ) : void ;
142- selectAllInFile ( fileName : string ) : void ;
143142 }
144143 class verifyNegatable {
145144 private negative ;
@@ -179,7 +178,7 @@ declare namespace FourSlashInterface {
179178 isInCommentAtPosition ( onlyMultiLineDiverges ?: boolean ) : void ;
180179 codeFix ( options : {
181180 description : string ,
182- newFileContent ?: NewFileContent ,
181+ newFileContent ?: string | { readonly [ fileName : string ] : string } ,
183182 newRangeContent ?: string ,
184183 errorCode ?: number ,
185184 index ?: number ,
@@ -191,7 +190,6 @@ declare namespace FourSlashInterface {
191190 applicableRefactorAvailableForRange ( ) : void ;
192191
193192 refactorAvailable ( name : string , actionName ?: string ) : void ;
194- refactorsAvailable ( names : ReadonlyArray < string > ) : void ;
195193 refactor ( options : {
196194 name : string ;
197195 actionName : string ;
@@ -257,14 +255,15 @@ declare namespace FourSlashInterface {
257255 * For each of starts, asserts the ranges that are referenced from there.
258256 * This uses the 'findReferences' command instead of 'getReferencesAtPosition', so references are grouped by their definition.
259257 */
260- referenceGroups ( starts : ArrayOrSingle < string > | ArrayOrSingle < Range > , parts : Array < FourSlashInterface . ReferenceGroup > ) : void ;
258+ referenceGroups ( starts : ArrayOrSingle < string > | ArrayOrSingle < Range > , parts : Array < { definition : ReferencesDefinition , ranges : Range [ ] } > ) : void ;
261259 singleReferenceGroup ( definition : ReferencesDefinition , ranges ?: Range [ ] ) : void ;
262260 rangesAreOccurrences ( isWriteAccess ?: boolean ) : void ;
263261 rangesWithSameTextAreRenameLocations ( ) : void ;
264262 rangesAreRenameLocations ( options ?: Range [ ] | { findInStrings ?: boolean , findInComments ?: boolean , ranges ?: Range [ ] } ) ;
265263 findReferencesDefinitionDisplayPartsAtCaretAre ( expected : ts . SymbolDisplayPart [ ] ) : void ;
266264 noSignatureHelp ( ...markers : string [ ] ) : void ;
267- noSignatureHelpForTriggerCharacter ( triggerCharacter : string , ...markers : string [ ] ) : void
265+ noSignatureHelpForTriggerReason ( triggerReason : SignatureHelpTriggerReason , ...markers : string [ ] ) : void
266+ signatureHelpPresentForTriggerReason ( triggerReason : SignatureHelpTriggerReason , ...markers : string [ ] ) : void
268267 signatureHelp ( ...options : VerifySignatureHelpOptions [ ] , ) : void ;
269268 // Checks that there are no compile errors.
270269 noErrors ( ) : void ;
@@ -338,7 +337,7 @@ declare namespace FourSlashInterface {
338337 getEditsForFileRename ( options : {
339338 oldPath : string ;
340339 newPath : string ;
341- newFileContents : { readonly [ fileName : string ] : string } ;
340+ newFileContents : { [ fileName : string ] : string } ;
342341 } ) : void ;
343342 moveToNewFile ( options : {
344343 readonly newFileContents : { readonly [ fileName : string ] : string } ;
@@ -359,7 +358,7 @@ declare namespace FourSlashInterface {
359358 enableFormatting ( ) : void ;
360359 disableFormatting ( ) : void ;
361360
362- applyRefactor ( options : { refactorName : string , actionName : string , actionDescription : string , newContent : NewFileContent } ) : void ;
361+ applyRefactor ( options : { refactorName : string , actionName : string , actionDescription : string , newContent : string } ) : void ;
363362 }
364363 class debug {
365364 printCurrentParameterHelp ( ) : void ;
@@ -514,10 +513,6 @@ declare namespace FourSlashInterface {
514513 text : string ;
515514 range : Range ;
516515 }
517- interface ReferenceGroup {
518- readonly definition : ReferencesDefinition ;
519- readonly ranges : ReadonlyArray < Range > ;
520- }
521516 interface Diagnostic {
522517 message : string ;
523518 /** @default `test.ranges()[0]` */
@@ -567,7 +562,47 @@ declare namespace FourSlashInterface {
567562 argumentCount ?: number ;
568563 isVariadic ?: boolean ;
569564 tags ?: ReadonlyArray < JSDocTagInfo > ;
570- triggerCharacter ?: string ;
565+ triggerReason ?: SignatureHelpTriggerReason ;
566+ }
567+
568+ export type SignatureHelpTriggerReason =
569+ | SignatureHelpInvokedReason
570+ | SignatureHelpCharacterTypedReason
571+ | SignatureHelpRetriggeredReason ;
572+
573+ /**
574+ * Signals that the user manually requested signature help.
575+ * The language service will unconditionally attempt to provide a result.
576+ */
577+ export interface SignatureHelpInvokedReason {
578+ kind : "invoked" ,
579+ triggerCharacter ?: undefined ,
580+ }
581+
582+ /**
583+ * Signals that the signature help request came from a user typing a character.
584+ * Depending on the character and the syntactic context, the request may or may not be served a result.
585+ */
586+ export interface SignatureHelpCharacterTypedReason {
587+ kind : "characterTyped" ,
588+ /**
589+ * Character that was responsible for triggering signature help.
590+ */
591+ triggerCharacter : string ,
592+ }
593+
594+ /**
595+ * Signals that this signature help request came from typing a character or moving the cursor.
596+ * This should only occur if a signature help session was already active and the editor needs to see if it should adjust.
597+ * The language service will unconditionally attempt to provide a result.
598+ * `triggerCharacter` can be `undefined` for a retrigger caused by a cursor move.
599+ */
600+ export interface SignatureHelpRetriggeredReason {
601+ kind : "retrigger" ,
602+ /**
603+ * Character that was responsible for triggering signature help.
604+ */
605+ triggerCharacter ?: string ,
571606 }
572607
573608 interface JSDocTagInfo {
@@ -576,7 +611,6 @@ declare namespace FourSlashInterface {
576611 }
577612
578613 type ArrayOrSingle < T > = T | ReadonlyArray < T > ;
579- type NewFileContent = string | { readonly [ fileName : string ] : string } ;
580614}
581615declare function verifyOperationIsCancelled ( f : any ) : void ;
582616declare var test : FourSlashInterface . test_ ;
0 commit comments