@@ -483,9 +483,7 @@ namespace FourSlash {
483483 }
484484
485485 // Opens a file given its 0-based index or fileName
486- public openFile ( index : number , content ?: string , scriptKindName ?: string ) : void ;
487- public openFile ( name : string , content ?: string , scriptKindName ?: string ) : void ;
488- public openFile ( indexOrName : any , content ?: string , scriptKindName ?: string ) {
486+ public openFile ( indexOrName : number | string , content ?: string , scriptKindName ?: string ) : void {
489487 const fileToOpen : FourSlashFile = this . findFile ( indexOrName ) ;
490488 fileToOpen . fileName = ts . normalizeSlashes ( fileToOpen . fileName ) ;
491489 this . activeFile = fileToOpen ;
@@ -3093,7 +3091,7 @@ Actual: ${stringify(fullActual)}`);
30933091 this . raiseError ( `Expected "${ stringify ( { entryId, text, documentation, kind } ) } " to be in list [${ itemsString } ]` ) ;
30943092 }
30953093
3096- private findFile ( indexOrName : any ) {
3094+ private findFile ( indexOrName : string | number ) {
30973095 let result : FourSlashFile ;
30983096 if ( typeof indexOrName === "number" ) {
30993097 const index = < number > indexOrName ;
@@ -3745,9 +3743,7 @@ namespace FourSlashInterface {
37453743 this . state . goToImplementation ( ) ;
37463744 }
37473745
3748- public position ( position : number , fileIndex ?: number ) : void ;
3749- public position ( position : number , fileName ?: string ) : void ;
3750- public position ( position : number , fileNameOrIndex ?: any ) : void {
3746+ public position ( position : number , fileNameOrIndex ?: string | number ) : void {
37513747 if ( fileNameOrIndex !== undefined ) {
37523748 this . file ( fileNameOrIndex ) ;
37533749 }
@@ -3757,9 +3753,7 @@ namespace FourSlashInterface {
37573753 // Opens a file, given either its index as it
37583754 // appears in the test source, or its filename
37593755 // as specified in the test metadata
3760- public file ( index : number , content ?: string , scriptKindName ?: string ) : void ;
3761- public file ( name : string , content ?: string , scriptKindName ?: string ) : void ;
3762- public file ( indexOrName : any , content ?: string , scriptKindName ?: string ) : void {
3756+ public file ( indexOrName : number | string , content ?: string , scriptKindName ?: string ) : void {
37633757 this . state . openFile ( indexOrName , content , scriptKindName ) ;
37643758 }
37653759
@@ -3966,17 +3960,14 @@ namespace FourSlashInterface {
39663960 this . state . verifyGoToDefinitionIs ( endMarkers ) ;
39673961 }
39683962
3969- public goToDefinition ( startMarkerName : string | string [ ] , endMarkerName : string | string [ ] ) : void ;
3970- public goToDefinition ( startMarkerName : string | string [ ] , endMarkerName : string | string [ ] , range : FourSlash . Range ) : void ;
3971- public goToDefinition ( startsAndEnds : [ string | string [ ] , string | string [ ] ] [ ] ) : void ;
3972- public goToDefinition ( startsAndEnds : { [ startMarkerName : string ] : string | string [ ] } ) : void ;
3963+ public goToDefinition ( startMarkerName : string | string [ ] , endMarkerName : string | string [ ] , range ?: FourSlash . Range ) : void ;
3964+ public goToDefinition ( startsAndEnds : [ string | string [ ] , string | string [ ] ] [ ] | { [ startMarkerName : string ] : string | string [ ] } ) : void ;
39733965 public goToDefinition ( arg0 : any , endMarkerName ?: string | string [ ] ) {
39743966 this . state . verifyGoToDefinition ( arg0 , endMarkerName ) ;
39753967 }
39763968
39773969 public goToType ( startMarkerName : string | string [ ] , endMarkerName : string | string [ ] ) : void ;
3978- public goToType ( startsAndEnds : [ string | string [ ] , string | string [ ] ] [ ] ) : void ;
3979- public goToType ( startsAndEnds : { [ startMarkerName : string ] : string | string [ ] } ) : void ;
3970+ public goToType ( startsAndEnds : [ string | string [ ] , string | string [ ] ] [ ] | { [ startMarkerName : string ] : string | string [ ] } ) : void ;
39803971 public goToType ( arg0 : any , endMarkerName ?: string | string [ ] ) {
39813972 this . state . verifyGoToType ( arg0 , endMarkerName ) ;
39823973 }
0 commit comments