namespace FourSlashInterface { export class Test { constructor ( private state ) { } public markers ( ) { return this . state . getMarkers ( ) ; } public markerNames ( ) { return this . state . getMarkerNames ( ) ; } public marker ( name ) { return this . state . getMarkerByName ( name ) ; } public markerName ( m ) { return this . state . markerName ( m ) ; } public ranges ( ) { return this . state . getRanges ( ) ; } public rangesInFile ( fileName ? ) { return this . state . getRangesInFile ( fileName ) ; } public spans ( ) { return this . ranges ( ) . map ( r => ts . createTextSpan ( r . pos , r . end - r . pos ) ) ; } public rangesByText ( ) { return this . state . rangesByText ( ) ; } public markerByName ( s ) { return this . state . getMarkerByName ( s ) ; } public symbolsInScope ( range ) { return this . state . symbolsInScope ( range ) ; } public setTypesRegistry ( map ) { this . state . setTypesRegistry ( map ) ; } } export class Config { constructor ( private state ) { } public configurePlugin ( pluginName , configuration ) { this . state . configurePlugin ( pluginName , configuration ) ; } public setCompilerOptionsForInferredProjects ( options ) { this . state . setCompilerOptionsForInferredProjects ( options ) ; } } export class GoTo { constructor ( private state ) { } public marker ( name ? ) { this . state . goToMarker ( name ) ; } public eachMarker ( markers , action ) ; public eachMarker ( action ) ; public eachMarker ( a , b ? ) { const markers = typeof a === "function" ? this . state . getMarkers ( ) : a . map ( m => this . state . getMarkerByName ( m ) ) ; this . state . goToEachMarker ( markers , typeof a === "function" ? a : b ! ) ; } public rangeStart ( range ) { this . state . goToRangeStart ( range ) ; } public eachRange ( action ) { this . state . goToEachRange ( action ) ; } public bof ( ) { this . state . goToBOF ( ) ; } public eof ( ) { this . state . goToEOF ( ) ; } public implementation ( ) { this . state . goToImplementation ( ) ; } public position ( positionOrLineAndCharacter , fileNameOrIndex ? ) { if ( fileNameOrIndex !== undefined ) { this . file ( fileNameOrIndex ) ; } this . state . goToPosition ( positionOrLineAndCharacter ) ; } public file ( indexOrName , content ? , scriptKindName ? ) { this . state . openFile ( indexOrName , content , scriptKindName ) ; } public select ( startMarker , endMarker ) { this . state . select ( startMarker , endMarker ) ; } public selectAllInFile ( fileName ) { this . state . selectAllInFile ( fileName ) ; } public selectRange ( range ) { this . state . selectRange ( range ) ; } } export class VerifyNegatable { public not : VerifyNegatable | undefined ; constructor ( protected state , private negative = false ) { if ( ! negative ) { this . not = new VerifyNegatable ( state , true ) ; } } public assertHasRanges ( ranges ) { assert ( ranges . length !== 0 , "Array of ranges is expected to be non-empty" ) ; } public noSignatureHelp ( ... markers ) { this . state . verifySignatureHelpPresence ( false , undefined , markers ) ; } public noSignatureHelpForTriggerReason ( reason , ... markers ) { this . state . verifySignatureHelpPresence ( false , reason , markers ) ; } public signatureHelpPresentForTriggerReason ( reason , ... markers ) { this . state . verifySignatureHelpPresence ( true , reason , markers ) ; } public signatureHelp ( ... options ) { this . state . verifySignatureHelp ( options ) ; } public errorExistsBetweenMarkers ( startMarker , endMarker ) { this . state . verifyErrorExistsBetweenMarkers ( startMarker , endMarker , ! this . negative ) ; } public errorExistsAfterMarker ( markerName = "" ) { this . state . verifyErrorExistsAfterMarker ( markerName , ! this . negative , true ) ; } public errorExistsBeforeMarker ( markerName = "" ) { this . state . verifyErrorExistsAfterMarker ( markerName , ! this . negative , false ) ; } public quickInfoExists ( ) { this . state . verifyQuickInfoExists ( this . negative ) ; } public typeDefinitionCountIs ( expectedCount ) { this . state . verifyTypeDefinitionsCount ( this . negative , expectedCount ) ; } public implementationListIsEmpty ( ) { this . state . verifyImplementationListIsEmpty ( this . negative ) ; } public isValidBraceCompletionAtPosition ( openingBrace ) { this . state . verifyBraceCompletionAtPosition ( this . negative , openingBrace ) ; } public jsxClosingTag ( map ) { this . state . verifyJsxClosingTag ( map ) ; } public isInCommentAtPosition ( onlyMultiLineDiverges ? ) { this . state . verifySpanOfEnclosingComment ( this . negative , onlyMultiLineDiverges ) ; } public codeFix ( options ) { this . state . verifyCodeFix ( options ) ; } public codeFixAvailable ( options ? ) { this . state . verifyCodeFixAvailable ( this . negative , options ) ; } public codeFixAllAvailable ( fixName ) { this . state . verifyCodeFixAllAvailable ( this . negative , fixName ) ; } public applicableRefactorAvailableAtMarker ( markerName ) { this . state . verifyApplicableRefactorAvailableAtMarker ( this . negative , markerName ) ; } public applicableRefactorAvailableForRange ( ) { this . state . verifyApplicableRefactorAvailableForRange ( this . negative ) ; } public refactorsAvailable ( names ) { this . state . verifyRefactorsAvailable ( names ) ; } public refactorAvailable ( name , actionName ? ) { this . state . verifyRefactorAvailable ( this . negative , "implicit" , name , actionName ) ; } public refactorAvailableForTriggerReason ( triggerReason , name , actionName ? ) { this . state . verifyRefactorAvailable ( this . negative , triggerReason , name , actionName ) ; } public refactorKindAvailable ( kind , expected , preferences = ts . emptyOptions ) { this . state . verifyRefactorKindsAvailable ( kind , expected , preferences ) ; } public toggleLineComment ( newFileContent ) { this . state . toggleLineComment ( newFileContent ) ; } public toggleMultilineComment ( newFileContent ) { this . state . toggleMultilineComment ( newFileContent ) ; } public commentSelection ( newFileContent ) { this . state . commentSelection ( newFileContent ) ; } public uncommentSelection ( newFileContent ) { this . state . uncommentSelection ( newFileContent ) ; } } export class Verify extends VerifyNegatable { constructor ( state ) { super ( state ) ; } public completions ( ... optionsArray ) { for ( const options of optionsArray ) { this . state . verifyCompletions ( options ) ; } } public getInlayHints ( expected , span , preference ? ) { this . state . verifyInlayHints ( expected , span , preference ) ; } public quickInfoIs ( expectedText , expectedDocumentation ? ) { this . state . verifyQuickInfoString ( expectedText , expectedDocumentation ) ; } public quickInfoAt ( markerName , expectedText , expectedDocumentation ? ) { this . state . verifyQuickInfoAt ( markerName , expectedText , expectedDocumentation ) ; } public quickInfos ( namesAndTexts ) { this . state . verifyQuickInfos ( namesAndTexts ) ; } public caretAtMarker ( markerName ? ) { this . state . verifyCaretAtMarker ( markerName ) ; } public indentationIs ( numberOfSpaces ) { this . state . verifyIndentationAtCurrentPosition ( numberOfSpaces ) ; } public indentationAtPositionIs ( fileName , position , numberOfSpaces , indentStyle = ts . IndentStyle . Smart , baseIndentSize = 0 ) { this . state . verifyIndentationAtPosition ( fileName , position , numberOfSpaces , indentStyle , baseIndentSize ) ; } public textAtCaretIs ( text ) { this . state . verifyTextAtCaretIs ( text ) ; } /**
         * Compiles the current file and evaluates 'expr' in a context containing
         * the emitted output, then compares (using ===) the result of that expression
         * to 'value'. Do not use this function with external modules as it is not supported.
         */ public eval ( expr , value ) { this . state . verifyEval ( expr , value ) ; } public currentLineContentIs ( text ) { this . state . verifyCurrentLineContent ( text ) ; } public currentFileContentIs ( text ) { this . state . verifyCurrentFileContent ( text ) ; } public formatDocumentChangesNothing ( ) { this . state . verifyFormatDocumentChangesNothing ( ) ; } public goToDefinitionIs ( endMarkers ) { this . state . verifyGoToDefinitionIs ( endMarkers ) ; } public goToDefinition ( startMarkerName , endMarkerName , range ? ) ; public goToDefinition ( startsAndEnds ) ; public goToDefinition ( arg0 , endMarkerName ? ) { this . state . verifyGoToDefinition ( arg0 , endMarkerName ) ; } public goToType ( startMarkerName , endMarkerName ) ; public goToType ( startsAndEnds ) ; public goToType ( arg0 , endMarkerName ? ) { this . state . verifyGoToType ( arg0 , endMarkerName ) ; } public goToDefinitionForMarkers ( ... markerNames ) { this . state . verifyGoToDefinitionForMarkers ( markerNames ) ; } public goToDefinitionName ( name , containerName ) { this . state . verifyGoToDefinitionName ( name , containerName ) ; } public verifyGetEmitOutputForCurrentFile ( expected ) { this . state . verifyGetEmitOutputForCurrentFile ( expected ) ; } public verifyGetEmitOutputContentsForCurrentFile ( expected ) { this . state . verifyGetEmitOutputContentsForCurrentFile ( expected ) ; } public symbolAtLocation ( startRange , ... declarationRanges ) { this . state . verifySymbolAtLocation ( startRange , declarationRanges ) ; } public typeOfSymbolAtLocation ( range , symbol , expected ) { this . state . verifyTypeOfSymbolAtLocation ( range , symbol , expected ) ; } public baselineFindAllReferences ( ... markerNames ) { this . state . verifyBaselineFindAllReferences ( ... markerNames ) ; } public baselineGetFileReferences ( fileName ) { this . state . verifyBaselineGetFileReferences ( fileName ) ; } public singleReferenceGroup ( definition , ranges ? ) { this . state . verifySingleReferenceGroup ( definition , ranges ) ; } public findReferencesDefinitionDisplayPartsAtCaretAre ( expected ) { this . state . verifyDisplayPartsOfReferencedSymbol ( expected ) ; } public noErrors ( ) { this . state . verifyNoErrors ( ) ; } public errorExistsAtRange ( range , code , message ? ) { this . state . verifyErrorExistsAtRange ( range , code , message ) ; } public numberOfErrorsInCurrentFile ( expected ) { this . state . verifyNumberOfErrorsInCurrentFile ( expected ) ; } public baselineCurrentFileBreakpointLocations ( ) { this . state . baselineCurrentFileBreakpointLocations ( ) ; } public baselineCurrentFileNameOrDottedNameSpans ( ) { this . state . baselineCurrentFileNameOrDottedNameSpans ( ) ; } public getEmitOutput ( expectedOutputFiles ) { this . state . verifyGetEmitOutput ( expectedOutputFiles ) ; } public baselineGetEmitOutput ( ) { this . state . baselineGetEmitOutput ( ) ; } public baselineQuickInfo ( ) { this . state . baselineQuickInfo ( ) ; } public baselineSignatureHelp ( ) { this . state . baselineSignatureHelp ( ) ; } public baselineCompletions ( ) { this . state . baselineCompletions ( ) ; } public baselineSmartSelection ( ) { this . state . baselineSmartSelection ( ) ; } public baselineSyntacticDiagnostics ( ) { this . state . baselineSyntacticDiagnostics ( ) ; } public baselineSyntacticAndSemanticDiagnostics ( ) { this . state . baselineSyntacticAndSemanticDiagnostics ( ) ; } public nameOrDottedNameSpanTextIs ( text ) { this . state . verifyCurrentNameOrDottedNameSpanText ( text ) ; } public outliningSpansInCurrentFile ( spans , kind ? ) { this . state . verifyOutliningSpans ( spans , kind ) ; } public outliningHintSpansInCurrentFile ( spans ) { this . state . verifyOutliningHintSpans ( spans ) ; } public todoCommentsInCurrentFile ( descriptors ) { this . state . verifyTodoComments ( descriptors , this . state . getRanges ( ) ) ; } public matchingBracePositionInCurrentFile ( bracePosition , expectedMatchPosition ) { this . state . verifyMatchingBracePosition ( bracePosition , expectedMatchPosition ) ; } public noMatchingBracePositionInCurrentFile ( bracePosition ) { this . state . verifyNoMatchingBracePosition ( bracePosition ) ; } public docCommentTemplateAt ( marker , expectedOffset , expectedText , options ? ) { this . state . goToMarker ( marker ) ; this . state . verifyDocCommentTemplate ( { newText : expectedText . replace ( /\r?\n/g , "\r\n" ) , caretOffset : expectedOffset } , options ) ; } public noDocCommentTemplateAt ( marker ) { this . state . goToMarker ( marker ) ; this . state . verifyDocCommentTemplate ( undefined ) ; } public rangeAfterCodeFix ( expectedText , includeWhiteSpace ? , errorCode ? , index ? ) { this . state . verifyRangeAfterCodeFix ( expectedText , includeWhiteSpace , errorCode , index ) ; } public codeFixAll ( options ) { this . state . verifyCodeFixAll ( options ) ; } public fileAfterApplyingRefactorAtMarker ( markerName , expectedContent , refactorNameToApply , actionName , formattingOptions ? ) { this . state . verifyFileAfterApplyingRefactorAtMarker ( markerName , expectedContent , refactorNameToApply , actionName , formattingOptions ) ; } public rangeIs ( expectedText , includeWhiteSpace ? ) { this . state . verifyRangeIs ( expectedText , includeWhiteSpace ) ; } public getAndApplyCodeFix ( errorCode ? , index ? ) { this . state . getAndApplyCodeActions ( errorCode , index ) ; } public applyCodeActionFromCompletion ( markerName , options ) { this . state . applyCodeActionFromCompletion ( markerName , options ) ; } public importFixAtPosition ( expectedTextArray , errorCode ? , preferences ? ) { this . state . verifyImportFixAtPosition ( expectedTextArray , errorCode , preferences ) ; } public importFixModuleSpecifiers ( marker , moduleSpecifiers ) { this . state . verifyImportFixModuleSpecifiers ( marker , moduleSpecifiers ) ; } public navigationBar ( json , options ? ) { this . state . verifyNavigationBar ( json , options ) ; } public navigationTree ( json , options ? ) { this . state . verifyNavigationTree ( json , options ) ; } public navigateTo ( ... options ) { this . state . verifyNavigateTo ( options ) ; } public occurrencesAtPositionContains ( range , isWriteAccess ? ) { this . state . verifyOccurrencesAtPositionListContains ( range . fileName , range . pos , range . end , isWriteAccess ) ; } public occurrencesAtPositionCount ( expectedCount ) { this . state . verifyOccurrencesAtPositionListCount ( expectedCount ) ; } public rangesAreOccurrences ( isWriteAccess ? , ranges ? ) { this . state . verifyRangesAreOccurrences ( isWriteAccess , ranges ) ; } public rangesWithSameTextAreRenameLocations ( ... texts ) { this . state . verifyRangesWithSameTextAreRenameLocations ( ... texts ) ; } public rangesAreRenameLocations ( options ? ) { this . state . verifyRangesAreRenameLocations ( options ) ; } public rangesAreDocumentHighlights ( ranges ? , options ? ) { this . state . verifyRangesAreDocumentHighlights ( ranges , options ) ; } public rangesWithSameTextAreDocumentHighlights ( ) { this . state . verifyRangesWithSameTextAreDocumentHighlights ( ) ; } public documentHighlightsOf ( startRange , ranges , options ? ) { this . state . verifyDocumentHighlightsOf ( startRange , ranges , options ) ; } public noDocumentHighlights ( startRange ) { this . state . verifyNoDocumentHighlights ( startRange ) ; } /**
         * This method *requires* a contiguous, complete, and ordered stream of classifications for a file.
         */ public syntacticClassificationsAre ( ... classifications ) { this . state . verifySyntacticClassifications ( classifications ) ; } public encodedSemanticClassificationsLength ( format , length ) { this . state . verifyEncodedSemanticClassificationsLength ( format , length ) ; } /**
         * This method *requires* an ordered stream of classifications for a file, and spans are highly recommended.
         */ public semanticClassificationsAre ( format , ... classifications ) { this . state . verifySemanticClassifications ( format , classifications ) ; } public replaceWithSemanticClassifications ( format ) { this . state . replaceWithSemanticClassifications ( format ) ; } public renameInfoSucceeded ( displayName ? , fullDisplayName ? , kind ? , kindModifiers ? , fileToRename ? , expectedRange ? , options ? ) { this . state . verifyRenameInfoSucceeded ( displayName , fullDisplayName , kind , kindModifiers , fileToRename , expectedRange , options ) ; } public renameInfoFailed ( message ? , allowRenameOfImportPath ? ) { this . state . verifyRenameInfoFailed ( message , allowRenameOfImportPath ) ; } public renameLocations ( startRanges , options ) { this . state . verifyRenameLocations ( startRanges , options ) ; } public baselineRename ( marker , options ) { this . state . baselineRename ( marker , options ) ; } public verifyQuickInfoDisplayParts ( kind , kindModifiers , textSpan , displayParts , documentation , tags ) { this . state . verifyQuickInfoDisplayParts ( kind , kindModifiers , textSpan , displayParts , documentation , tags ) ; } public getSyntacticDiagnostics ( expected ) { this . state . getSyntacticDiagnostics ( expected ) ; } public getSemanticDiagnostics ( expected ) { this . state . getSemanticDiagnostics ( expected ) ; } public getSuggestionDiagnostics ( expected ) { this . state . getSuggestionDiagnostics ( expected ) ; } public ProjectInfo ( expected ) { this . state . verifyProjectInfo ( expected ) ; } public allRangesAppearInImplementationList ( markerName ) { this . state . verifyRangesInImplementationList ( markerName ) ; } public getEditsForFileRename ( options ) { this . state . getEditsForFileRename ( options ) ; } public baselineCallHierarchy ( ) { this . state . baselineCallHierarchy ( ) ; } public moveToNewFile ( options ) { this . state . moveToNewFile ( options ) ; } public noMoveToNewFile ( ) { this . state . noMoveToNewFile ( ) ; } public organizeImports ( newContent ) { this . state . verifyOrganizeImports ( newContent ) ; } } export class Edit { constructor ( private state ) { } public backspace ( count ? ) { this . state . deleteCharBehindMarker ( count ) ; } public deleteAtCaret ( times ? ) { this . state . deleteChar ( times ) ; } public replace ( start , length , text ) { this . state . replace ( start , length , text ) ; } public paste ( text ) { this . state . paste ( text ) ; } public insert ( text ) { this . insertLines ( text ) ; } public insertLine ( text ) { this . insertLines ( text + "\n" ) ; } public insertLines ( ... lines ) { this . state . type ( lines . join ( "\n" ) ) ; } public deleteLine ( index ) { this . deleteLineRange ( index , index ) ; } public deleteLineRange ( startIndex , endIndexInclusive ) { this . state . deleteLineRange ( startIndex , endIndexInclusive ) ; } public replaceLine ( index , text ) { this . state . selectLine ( index ) ; this . state . type ( text ) ; } public moveRight ( count ? ) { this . state . moveCaretRight ( count ) ; } public moveLeft ( count ? ) { if ( typeof count === "undefined" ) { count = 1 ; } this . state . moveCaretRight ( count * - 1 ) ; } public enableFormatting ( ) { this . state . enableFormatting = true ; } public disableFormatting ( ) { this . state . enableFormatting = false ; } public applyRefactor ( options ) { this . state . applyRefactor ( options ) ; } } export class Debug { constructor ( private state ) { } public printCurrentParameterHelp ( ) { this . state . printCurrentParameterHelp ( ) ; } public printCurrentFileState ( ) { this . state . printCurrentFileState ( false , true ) ; } public printCurrentFileStateWithWhitespace ( ) { this . state . printCurrentFileState ( true , true ) ; } public printCurrentFileStateWithoutCaret ( ) { this . state . printCurrentFileState ( false , false ) ; } public printCurrentQuickInfo ( ) { this . state . printCurrentQuickInfo ( ) ; } public printCurrentSignatureHelp ( ) { this . state . printCurrentSignatureHelp ( ) ; } public printCompletionListMembers ( options ) { this . state . printCompletionListMembers ( options ) ; } public printAvailableCodeFixes ( ) { this . state . printAvailableCodeFixes ( ) ; } public printBreakpointLocation ( pos ) { this . state . printBreakpointLocation ( pos ) ; } public printBreakpointAtCurrentLocation ( ) { this . state . printBreakpointAtCurrentLocation ( ) ; } public printNameOrDottedNameSpans ( pos ) { this . state . printNameOrDottedNameSpans ( pos ) ; } public printErrorList ( ) { this . state . printErrorList ( ) ; } public printNavigationItems ( searchValue = ".*" ) { this . state . printNavigationItems ( searchValue ) ; } public printNavigationBar ( ) { this . state . printNavigationBar ( ) ; } public printContext ( ) { this . state . printContext ( ) ; } public printOutliningSpans ( ) { this . state . printOutliningSpans ( ) ; } } export class Format { constructor ( private state ) { } public document ( ) { this . state . formatDocument ( ) ; } public copyFormatOptions ( ) { return this . state . copyFormatOptions ( ) ; } public setFormatOptions ( options ) { return this . state . setFormatOptions ( options ) ; } public selection ( startMarker , endMarker ) { this . state . formatSelection ( this . state . getMarkerByName ( startMarker ) . position , this . state . getMarkerByName ( endMarker ) . position ) ; } public onType ( posMarker , key ) { this . state . formatOnType ( this . state . getMarkerByName ( posMarker ) . position , key ) ; } public setOption ( name , value ) { this . state . setFormatOptions ( { ... this . state . formatCodeSettings , [ name ] : value } ) ; } } export class Cancellation { constructor ( private state ) { } public resetCancelled ( ) { this . state . resetCancelled ( ) ; } public setCancelled ( numberOfCalls = 0 ) { this . state . setCancelled ( numberOfCalls ) ; } } interface OlderClassification { classificationType : ts . ClassificationTypeNames ; text : string ; textSpan ? : FourSlash . TextSpan ; } interface ModernClassification { classificationType : string ; text ? : string ; textSpan ? : FourSlash . TextSpan ; } type Classification = OlderClassification | ModernClassification ; export function classification ( format ) { function semanticToken ( identifier , text , _position ) { return { classificationType : identifier , text } ; } if ( format === ts . SemanticClassificationFormat . TwentyTwenty ) { return { semanticToken } ; } function comment ( text , position ? ) { return getClassification ( ts . ClassificationTypeNames . comment , text , position ) ; } function identifier ( text , position ? ) { return getClassification ( ts . ClassificationTypeNames . identifier , text , position ) ; } function keyword ( text , position ? ) { return getClassification ( ts . ClassificationTypeNames . keyword , text , position ) ; } function numericLiteral ( text , position ? ) { return getClassification ( ts . ClassificationTypeNames . numericLiteral , text , position ) ; } function operator ( text , position ? ) { return getClassification ( ts . ClassificationTypeNames . operator , text , position ) ; } function stringLiteral ( text , position ? ) { return getClassification ( ts . ClassificationTypeNames . stringLiteral , text , position ) ; } function whiteSpace ( text , position ? ) { return getClassification ( ts . ClassificationTypeNames . whiteSpace , text , position ) ; } function text ( text , position ? ) { return getClassification ( ts . ClassificationTypeNames . text , text , position ) ; } function punctuation ( text , position ? ) { return getClassification ( ts . ClassificationTypeNames . punctuation , text , position ) ; } function docCommentTagName ( text , position ? ) { return getClassification ( ts . ClassificationTypeNames . docCommentTagName , text , position ) ; } function className ( text , position ? ) { return getClassification ( ts . ClassificationTypeNames . className , text , position ) ; } function enumName ( text , position ? ) { return getClassification ( ts . ClassificationTypeNames . enumName , text , position ) ; } function interfaceName ( text , position ? ) { return getClassification ( ts . ClassificationTypeNames . interfaceName , text , position ) ; } function moduleName ( text , position ? ) { return getClassification ( ts . ClassificationTypeNames . moduleName , text , position ) ; } function typeParameterName ( text , position ? ) { return getClassification ( ts . ClassificationTypeNames . typeParameterName , text , position ) ; } function parameterName ( text , position ? ) { return getClassification ( ts . ClassificationTypeNames . parameterName , text , position ) ; } function typeAliasName ( text , position ? ) { return getClassification ( ts . ClassificationTypeNames . typeAliasName , text , position ) ; } function jsxOpenTagName ( text , position ? ) { return getClassification ( ts . ClassificationTypeNames . jsxOpenTagName , text , position ) ; } function jsxCloseTagName ( text , position ? ) { return getClassification ( ts . ClassificationTypeNames . jsxCloseTagName , text , position ) ; } function jsxSelfClosingTagName ( text , position ? ) { return getClassification ( ts . ClassificationTypeNames . jsxSelfClosingTagName , text , position ) ; } function jsxAttribute ( text , position ? ) { return getClassification ( ts . ClassificationTypeNames . jsxAttribute , text , position ) ; } function jsxText ( text , position ? ) { return getClassification ( ts . ClassificationTypeNames . jsxText , text , position ) ; } function jsxAttributeStringLiteralValue ( text , position ? ) { return getClassification ( ts . ClassificationTypeNames . jsxAttributeStringLiteralValue , text , position ) ; } function getClassification ( classificationType , text , position ? ) { const textSpan = position === undefined ? undefined : { start : position , end : position + text . length } ; return { classificationType , text , textSpan } ; } return { comment , identifier , keyword , numericLiteral , operator , stringLiteral , whiteSpace , text , punctuation , docCommentTagName , className , enumName , interfaceName , moduleName , typeParameterName , parameterName , typeAliasName , jsxOpenTagName , jsxCloseTagName , jsxSelfClosingTagName , jsxAttribute , jsxText , jsxAttributeStringLiteralValue , getClassification } ; } export namespace Completion { export import SortText = ts . Completions . SortText ; export import CompletionSource = ts . Completions . CompletionSource ; const functionEntry = ( name ) : ExpectedCompletionEntryObject => ( { name , kind : "function" , kindModifiers : "declare" , sortText : SortText . GlobalsOrKeywords } ) ; const deprecatedFunctionEntry = ( name ) : ExpectedCompletionEntryObject => ( { name , kind : "function" , kindModifiers : "deprecated,declare" , sortText : SortText . DeprecatedGlobalsOrKeywords } ) ; const varEntry = ( name ) : ExpectedCompletionEntryObject => ( { name , kind : "var" , kindModifiers : "declare" , sortText : SortText . GlobalsOrKeywords } ) ; const moduleEntry = ( name ) : ExpectedCompletionEntryObject => ( { name , kind : "module" , kindModifiers : "declare" , sortText : SortText . GlobalsOrKeywords } ) ; const keywordEntry = ( name ) : ExpectedCompletionEntryObject => ( { name , kind : "keyword" , sortText : SortText . GlobalsOrKeywords } ) ; const methodEntry = ( name ) : ExpectedCompletionEntryObject => ( { name , kind : "method" , kindModifiers : "declare" , sortText : SortText . LocationPriority } ) ; const deprecatedMethodEntry = ( name ) : ExpectedCompletionEntryObject => ( { name , kind : "method" , kindModifiers : "deprecated,declare" , sortText : SortText . DeprecatedLocationPriority } ) ; const propertyEntry = ( name ) : ExpectedCompletionEntryObject => ( { name , kind : "property" , kindModifiers : "declare" , sortText : SortText . LocationPriority } ) ; const interfaceEntry = ( name ) : ExpectedCompletionEntryObject => ( { name , kind : "interface" , kindModifiers : "declare" , sortText : SortText . GlobalsOrKeywords } ) ; const typeEntry = ( name ) : ExpectedCompletionEntryObject => ( { name , kind : "type" , kindModifiers : "declare" , sortText : SortText . GlobalsOrKeywords } ) ; const res = [ ] ; for ( let i = ts . SyntaxKind . FirstKeyword ; i <= ts . SyntaxKind . LastKeyword ; i ++ ) { res . push ( { name : ts . Debug . checkDefined ( ts . tokenToString ( i ) ) , kind : "keyword" , sortText : SortText . GlobalsOrKeywords } ) ; } export const keywordsWithUndefined = res ; export const keywords = keywordsWithUndefined . filter ( k => k . name !== "undefined" ) ; export const typeKeywords = [ "any" , "asserts" , "bigint" , "boolean" , "false" , "infer" , "keyof" , "never" , "null" , "number" , "object" , "readonly" , "string" , "symbol" , "true" , "undefined" , "unique" , "unknown" , "void" , ] . map ( keywordEntry ) ; export function sorted ( entries ) { return ts . stableSort ( entries , compareExpectedCompletionEntries ) ; } function combineExpectedCompletionEntries ( functionName , providedByHarness , providedByTest ) { return Object . assign ( sorted ( [ ... providedByHarness , ... providedByTest ] ) , { plusFunctionName : functionName , plusArgument : providedByTest } ) ; } export function typeKeywordsPlus ( plus ) { return combineExpectedCompletionEntries ( "typeKeywordsPlus" , typeKeywords , plus ) ; } const globalTypeDecls = [ interfaceEntry ( "Symbol" ) , typeEntry ( "PropertyKey" ) , interfaceEntry ( "PropertyDescriptor" ) , interfaceEntry ( "PropertyDescriptorMap" ) , varEntry ( "Object" ) , interfaceEntry ( "ObjectConstructor" ) , varEntry ( "Function" ) , interfaceEntry ( "FunctionConstructor" ) , typeEntry ( "ThisParameterType" ) , typeEntry ( "OmitThisParameter" ) , interfaceEntry ( "CallableFunction" ) , interfaceEntry ( "NewableFunction" ) , interfaceEntry ( "IArguments" ) , varEntry ( "String" ) , interfaceEntry ( "StringConstructor" ) , varEntry ( "Boolean" ) , interfaceEntry ( "BooleanConstructor" ) , varEntry ( "Number" ) , interfaceEntry ( "NumberConstructor" ) , interfaceEntry ( "TemplateStringsArray" ) , interfaceEntry ( "ImportMeta" ) , interfaceEntry ( "ImportCallOptions" ) , interfaceEntry ( "ImportAssertions" ) , varEntry ( "Math" ) , varEntry ( "Date" ) , interfaceEntry ( "DateConstructor" ) , interfaceEntry ( "RegExpMatchArray" ) , interfaceEntry ( "RegExpExecArray" ) , varEntry ( "RegExp" ) , interfaceEntry ( "RegExpConstructor" ) , varEntry ( "Error" ) , interfaceEntry ( "ErrorConstructor" ) , varEntry ( "EvalError" ) , interfaceEntry ( "EvalErrorConstructor" ) , varEntry ( "RangeError" ) , interfaceEntry ( "RangeErrorConstructor" ) , varEntry ( "ReferenceError" ) , interfaceEntry ( "ReferenceErrorConstructor" ) , varEntry ( "SyntaxError" ) , interfaceEntry ( "SyntaxErrorConstructor" ) , varEntry ( "TypeError" ) , interfaceEntry ( "TypeErrorConstructor" ) , varEntry ( "URIError" ) , interfaceEntry ( "URIErrorConstructor" ) , varEntry ( "JSON" ) , interfaceEntry ( "ReadonlyArray" ) , interfaceEntry ( "ConcatArray" ) , varEntry ( "Array" ) , interfaceEntry ( "ArrayConstructor" ) , interfaceEntry ( "TypedPropertyDescriptor" ) , typeEntry ( "ClassDecorator" ) , typeEntry ( "PropertyDecorator" ) , typeEntry ( "MethodDecorator" ) , typeEntry ( "ParameterDecorator" ) , typeEntry ( "PromiseConstructorLike" ) , interfaceEntry ( "PromiseLike" ) , interfaceEntry ( "Promise" ) , typeEntry ( "Awaited" ) , interfaceEntry ( "ArrayLike" ) , typeEntry ( "Partial" ) , typeEntry ( "Required" ) , typeEntry ( "Readonly" ) , typeEntry ( "Pick" ) , typeEntry ( "Record" ) , typeEntry ( "Exclude" ) , typeEntry ( "Extract" ) , typeEntry ( "Omit" ) , typeEntry ( "NonNullable" ) , typeEntry ( "Parameters" ) , typeEntry ( "ConstructorParameters" ) , typeEntry ( "ReturnType" ) , typeEntry ( "InstanceType" ) , typeEntry ( "Uppercase" ) , typeEntry ( "Lowercase" ) , typeEntry ( "Capitalize" ) , typeEntry ( "Uncapitalize" ) , interfaceEntry ( "ThisType" ) , varEntry ( "ArrayBuffer" ) , interfaceEntry ( "ArrayBufferTypes" ) , typeEntry ( "ArrayBufferLike" ) , interfaceEntry ( "ArrayBufferConstructor" ) , interfaceEntry ( "ArrayBufferView" ) , varEntry ( "DataView" ) , interfaceEntry ( "DataViewConstructor" ) , varEntry ( "Int8Array" ) , interfaceEntry ( "Int8ArrayConstructor" ) , varEntry ( "Uint8Array" ) , interfaceEntry ( "Uint8ArrayConstructor" ) , varEntry ( "Uint8ClampedArray" ) , interfaceEntry ( "Uint8ClampedArrayConstructor" ) , varEntry ( "Int16Array" ) , interfaceEntry ( "Int16ArrayConstructor" ) , varEntry ( "Uint16Array" ) , interfaceEntry ( "Uint16ArrayConstructor" ) , varEntry ( "Int32Array" ) , interfaceEntry ( "Int32ArrayConstructor" ) , varEntry ( "Uint32Array" ) , interfaceEntry ( "Uint32ArrayConstructor" ) , varEntry ( "Float32Array" ) , interfaceEntry ( "Float32ArrayConstructor" ) , varEntry ( "Float64Array" ) , interfaceEntry ( "Float64ArrayConstructor" ) , moduleEntry ( "Intl" ) , ] ; export const globalThisEntry = { name : "globalThis" , kind : "module" , sortText : SortText . GlobalsOrKeywords } ; export const globalTypes = globalTypesPlus ( [ ] ) ; export function globalTypesPlus ( plus ) { return combineExpectedCompletionEntries ( "globalTypesPlus" , [ globalThisEntry , ... globalTypeDecls , ... typeKeywords ] , plus ) ; } export const typeAssertionKeywords = globalTypesPlus ( [ keywordEntry ( "const" ) ] ) ; function getInJsKeywords ( keywords ) { return keywords . filter ( keyword => { switch ( keyword . name ) { case "enum" : case "interface" : case "implements" : case "private" : case "protected" : case "public" : case "abstract" : case "any" : case "boolean" : case "declare" : case "infer" : case "is" : case "keyof" : case "module" : case "namespace" : case "never" : case "readonly" : case "number" : case "object" : case "string" : case "symbol" : case "type" : case "unique" : case "override" : case "unknown" : case "global" : case "bigint" : return false ; default : return true ; } } ) ; } export const classElementKeywords = [ "abstract" , "async" , "constructor" , "declare" , "get" , "override" , "private" , "protected" , "public" , "readonly" , "set" , "static" , ] . map ( keywordEntry ) ; export const classElementInJsKeywords = getInJsKeywords ( classElementKeywords ) ; export const constructorParameterKeywords = [ "override" , "private" , "protected" , "public" , "readonly" ] . map ( ( name ) : ExpectedCompletionEntryObject => ( { name , kind : "keyword" , sortText : SortText . GlobalsOrKeywords } ) ) ; export const functionMembers = [ methodEntry ( "apply" ) , methodEntry ( "call" ) , methodEntry ( "bind" ) , methodEntry ( "toString" ) , propertyEntry ( "length" ) , { name : "arguments" , kind : "property" , kindModifiers : "declare" , text : "(property) Function.arguments: any" } , propertyEntry ( "caller" ) , ] . sort ( compareExpectedCompletionEntries ) ; export function functionMembersPlus ( plus ) { return combineExpectedCompletionEntries ( "functionMembersPlus" , functionMembers , plus ) ; } export const stringMembers = [ methodEntry ( "toString" ) , methodEntry ( "charAt" ) , methodEntry ( "charCodeAt" ) , methodEntry ( "concat" ) , methodEntry ( "indexOf" ) , methodEntry ( "lastIndexOf" ) , methodEntry ( "localeCompare" ) , methodEntry ( "match" ) , methodEntry ( "replace" ) , methodEntry ( "search" ) , methodEntry ( "slice" ) , methodEntry ( "split" ) , methodEntry ( "substring" ) , methodEntry ( "toLowerCase" ) , methodEntry ( "toLocaleLowerCase" ) , methodEntry ( "toUpperCase" ) , methodEntry ( "toLocaleUpperCase" ) , methodEntry ( "trim" ) , propertyEntry ( "length" ) , deprecatedMethodEntry ( "substr" ) , methodEntry ( "valueOf" ) , ] . sort ( compareExpectedCompletionEntries ) ; export const functionMembersWithPrototype = [ ... functionMembers , propertyEntry ( "prototype" ) , ] . sort ( compareExpectedCompletionEntries ) ; export function functionMembersWithPrototypePlus ( plus ) { return [ ... functionMembersWithPrototype , ... plus ] . sort ( compareExpectedCompletionEntries ) ; } export const statementKeywordsWithTypes = [ "abstract" , "any" , "as" , "asserts" , "async" , "await" , "bigint" , "boolean" , "break" , "case" , "catch" , "class" , "const" , "continue" , "debugger" , "declare" , "default" , "delete" , "do" , "else" , "enum" , "export" , "extends" , "false" , "finally" , "for" , "function" , "if" , "implements" , "import" , "in" , "infer" , "instanceof" , "interface" , "keyof" , "let" , "module" , "namespace" , "never" , "new" , "null" , "number" , "object" , "package" , "readonly" , "return" , "string" , "super" , "switch" , "symbol" , "this" , "throw" , "true" , "try" , "type" , "typeof" , "unique" , "unknown" , "var" , "void" , "while" , "with" , "yield" , ] . map ( keywordEntry ) ; export const statementKeywords = statementKeywordsWithTypes . filter ( k => { const name = k . name ; switch ( name ) { case "false" : case "true" : case "null" : case "void" : return true ; case "declare" : case "module" : return false ; default : return ! ts . contains ( typeKeywords , k ) ; } } ) ; export const statementInJsKeywords = getInJsKeywords ( statementKeywords ) ; export const globalsVars = [ varEntry ( "Array" ) , varEntry ( "ArrayBuffer" ) , varEntry ( "Boolean" ) , varEntry ( "DataView" ) , varEntry ( "Date" ) , functionEntry ( "decodeURI" ) , functionEntry ( "decodeURIComponent" ) , functionEntry ( "encodeURI" ) , functionEntry ( "encodeURIComponent" ) , varEntry ( "Error" ) , deprecatedFunctionEntry ( "escape" ) , functionEntry ( "eval" ) , varEntry ( "EvalError" ) , varEntry ( "Float32Array" ) , varEntry ( "Float64Array" ) , varEntry ( "Function" ) , varEntry ( "Infinity" ) , moduleEntry ( "Intl" ) , varEntry ( "Int16Array" ) , varEntry ( "Int32Array" ) , varEntry ( "Int8Array" ) , functionEntry ( "isFinite" ) , functionEntry ( "isNaN" ) , varEntry ( "JSON" ) , varEntry ( "Math" ) , varEntry ( "NaN" ) , varEntry ( "Number" ) , varEntry ( "Object" ) , functionEntry ( "parseFloat" ) , functionEntry ( "parseInt" ) , varEntry ( "RangeError" ) , varEntry ( "ReferenceError" ) , varEntry ( "RegExp" ) , varEntry ( "String" ) , varEntry ( "SyntaxError" ) , varEntry ( "TypeError" ) , varEntry ( "Uint16Array" ) , varEntry ( "Uint32Array" ) , varEntry ( "Uint8Array" ) , varEntry ( "Uint8ClampedArray" ) , deprecatedFunctionEntry ( "unescape" ) , varEntry ( "URIError" ) , ] ; const globalKeywordsInsideFunction = [ "as" , "async" , "await" , "break" , "case" , "catch" , "class" , "const" , "continue" , "debugger" , "default" , "delete" , "do" , "else" , "enum" , "export" , "extends" , "false" , "finally" , "for" , "function" , "if" , "implements" , "import" , "in" , "instanceof" , "interface" , "let" , "new" , "null" , "package" , "return" , "super" , "switch" , "this" , "throw" , "true" , "try" , "typeof" , "var" , "void" , "while" , "with" , "yield" , ] . map ( keywordEntry ) ; function compareExpectedCompletionEntries ( a , b ) { const aSortText = typeof a !== "string" && a . sortText || ts . Completions . SortText . LocationPriority ; const bSortText = typeof b !== "string" && b . sortText || ts . Completions . SortText . LocationPriority ; const bySortText = ts . compareStringsCaseSensitiveUI ( aSortText , bSortText ) ; if ( bySortText !== ts . Comparison . EqualTo ) return bySortText ; return ts . compareStringsCaseSensitiveUI ( typeof a === "string" ? a : a . name , typeof b === "string" ? b : b . name ) ; } export const undefinedVarEntry = { name : "undefined" , kind : "var" , sortText : SortText . GlobalsOrKeywords } ; export const globalsInsideFunction = ( plus , options ? ) : readonly ExpectedCompletionEntry [ ] => [ { name : "arguments" , kind : "local var" } , ... plus , globalThisEntry , ... options ?. noLib ? [ ] : globalsVars , undefinedVarEntry , ... globalKeywordsInsideFunction , ] . sort ( compareExpectedCompletionEntries ) ; const globalInJsKeywordsInsideFunction = getInJsKeywords ( globalKeywordsInsideFunction ) ; export const globalsInJsInsideFunction = ( plus , options ? ) : readonly ExpectedCompletionEntry [ ] => [ { name : "arguments" , kind : "local var" } , globalThisEntry , ... options ?. noLib ? [ ] : globalsVars , ... plus , undefinedVarEntry , ... globalInJsKeywordsInsideFunction , ] . sort ( compareExpectedCompletionEntries ) ; export const globalKeywords = [ "abstract" , "any" , "as" , "asserts" , "async" , "await" , "bigint" , "boolean" , "break" , "case" , "catch" , "class" , "const" , "continue" , "debugger" , "declare" , "default" , "delete" , "do" , "else" , "enum" , "export" , "extends" , "false" , "finally" , "for" , "function" , "if" , "implements" , "import" , "in" , "infer" , "instanceof" , "interface" , "keyof" , "let" , "module" , "namespace" , "never" , "new" , "null" , "number" , "object" , "package" , "readonly" , "return" , "string" , "super" , "switch" , "symbol" , "this" , "throw" , "true" , "try" , "type" , "typeof" , "unique" , "unknown" , "var" , "void" , "while" , "with" , "yield" , ] . map ( keywordEntry ) ; export const globalInJsKeywords = getInJsKeywords ( globalKeywords ) ; export const insideMethodKeywords = [ "as" , "async" , "await" , "break" , "case" , "catch" , "class" , "const" , "continue" , "debugger" , "default" , "delete" , "do" , "else" , "enum" , "export" , "extends" , "false" , "finally" , "for" , "function" , "if" , "implements" , "import" , "in" , "instanceof" , "interface" , "let" , "new" , "null" , "package" , "return" , "super" , "switch" , "this" , "throw" , "true" , "try" , "typeof" , "var" , "void" , "while" , "with" , "yield" , ] . map ( keywordEntry ) ; export const insideMethodInJsKeywords = getInJsKeywords ( insideMethodKeywords ) ; export const globals = [ globalThisEntry , ... globalsVars , undefinedVarEntry , ... globalKeywords ] . sort ( compareExpectedCompletionEntries ) ; export const globalsInJs = [ globalThisEntry , ... globalsVars , undefinedVarEntry , ... globalInJsKeywords ] . sort ( compareExpectedCompletionEntries ) ; export function globalsPlus ( plus , options ? ) { return combineExpectedCompletionEntries ( "globalsPlus" , [ globalThisEntry , ... options ?. noLib ? [ ] : globalsVars , undefinedVarEntry , ... globalKeywords , ] , plus ) ; } export function globalsInJsPlus ( plus , options ? ) { return combineExpectedCompletionEntries ( "globalsInJsPlus" , [ globalThisEntry , ... options ?. noLib ? [ ] : globalsVars , undefinedVarEntry , ... globalInJsKeywords , ] , plus ) ; } } export interface ReferenceGroup { definition : ReferenceGroupDefinition ; ranges : FourSlash . Range [ ] ; } export type ReferenceGroupDefinition = string | { text : string ; range : FourSlash . Range ; } ; export interface ApplyRefactorOptions { refactorName : string ; actionName : string ; actionDescription : string ; newContent : NewFileContent ; triggerReason ? : ts . RefactorTriggerReason ; } export type ExpectedCompletionEntry = string | ExpectedCompletionEntryObject ; export interface ExpectedCompletionEntryObject { readonly name : string ; readonly source ? : string ; readonly insertText ? : string ; readonly replacementSpan ? : FourSlash . Range ; readonly hasAction ? : boolean ; readonly isRecommended ? : boolean ; readonly isFromUncheckedFile ? : boolean ; readonly kind ? : string ; readonly isPackageJsonImport ? : boolean ; readonly isSnippet ? : boolean ; readonly kindModifiers ? : string ; readonly text ? : string ; readonly documentation ? : string ; readonly sourceDisplay ? : string ; readonly tags ? : readonly ts . JSDocTagInfo [ ] ; readonly sortText ? : ts . Completions . SortText ; } export type ExpectedExactCompletionsPlus = readonly ExpectedCompletionEntry [ ] & { plusFunctionName : string ; plusArgument : readonly ExpectedCompletionEntry [ ] ; } ; export interface VerifyCompletionsOptions { readonly marker ? : ArrayOrSingle < string | FourSlash . Marker > ; readonly isNewIdentifierLocation ? : boolean ; readonly isGlobalCompletion ? : boolean ; readonly optionalReplacementSpan ? : FourSlash . Range ; readonly exact ? : ArrayOrSingle < ExpectedCompletionEntry > | ExpectedExactCompletionsPlus ; readonly unsorted ? : readonly ExpectedCompletionEntry [ ] ; readonly includes ? : ArrayOrSingle < ExpectedCompletionEntry > ; readonly excludes ? : ArrayOrSingle < string > ; readonly preferences ? : ts . UserPreferences ; readonly triggerCharacter ? : ts . CompletionsTriggerCharacter ; } export interface VerifySignatureHelpOptions { readonly marker ? : ArrayOrSingle < string | FourSlash . Marker > ; default readonly overloadsCount ? : number ; default readonly docComment ? : string ; readonly text ? : string ; readonly parameterName ? : string ; readonly parameterSpan ? : string ; default readonly parameterDocComment ? : string ; readonly parameterCount ? : number ; readonly argumentCount ? : number ; default readonly isVariadic ? : boolean ; default readonly tags ? : readonly ts . JSDocTagInfo [ ] ; readonly triggerReason ? : ts . SignatureHelpTriggerReason ; readonly overrideSelectedItemIndex ? : number ; } export interface VerifyNavigateToOptions { readonly pattern : string ; readonly fileName ? : string ; readonly expected : readonly ExpectedNavigateToItem [ ] ; } export interface ExpectedNavigateToItem { readonly name : string ; readonly kind : ts . ScriptElementKind ; readonly kindModifiers ? : string ; readonly matchKind ? : keyof typeof ts . PatternMatchKind ; readonly isCaseSensitive ? : boolean ; readonly range : FourSlash . Range ; readonly containerName ? : string ; readonly containerKind ? : ts . ScriptElementKind ; } export interface VerifyInlayHintsOptions { text : string ; position : number ; kind ? : ts . InlayHintKind ; whitespaceBefore ? : boolean ; whitespaceAfter ? : boolean ; } export type ArrayOrSingle < T > = T | readonly T [ ] ; export interface VerifyCompletionListContainsOptions extends ts . UserPreferences { triggerCharacter ? : ts . CompletionsTriggerCharacter ; sourceDisplay : string ; isRecommended ? : true ; insertText ? : string ; replacementSpan ? : FourSlash . Range ; } export interface VerifyDocumentHighlightsOptions { filesToSearch ? : readonly string [ ] ; } export type NewFileContent = string | { readonly [ filename ] : string ; } ; export interface NewContentOptions { newFileContent ? : NewFileContent ; newRangeContent ? : string ; } export interface VerifyCodeFixOptions extends NewContentOptions { readonly description : string | [ string , ... ( string | number ) [ ] ] | DiagnosticIgnoredInterpolations ; readonly errorCode ? : number ; readonly index ? : number ; readonly preferences ? : ts . UserPreferences ; readonly applyChanges ? : boolean ; readonly commands ? : readonly ts . CodeActionCommand [ ] ; } export interface VerifyCodeFixAvailableOptions { description : string ; commands ? : ts . CodeActionCommand [ ] ; } export interface VerifyCodeFixAllOptions { fixId : string ; fixAllDescription : string ; newFileContent : NewFileContent ; commands : readonly { } [ ] ; } export interface VerifyRefactorOptions { name : string ; actionName : string ; refactors : readonly ts . ApplicableRefactorInfo [ ] ; } export interface VerifyCompletionActionOptions extends NewContentOptions { name : string ; source ? : string ; data ? : ts . CompletionEntryData ; description : string ; preferences ? : ts . UserPreferences ; } export interface Diagnostic { message : string ; range ? : FourSlash . Range ; code : number ; reportsUnnecessary ? : true ; reportsDeprecated ? : true ; } export interface GetEditsForFileRenameOptions { readonly oldPath : string ; readonly newPath : string ; readonly newFileContents : { readonly [ fileName ] : string ; } ; readonly preferences ? : ts . UserPreferences ; } export interface MoveToNewFileOptions { readonly newFileContents : { readonly [ fileName ] : string ; } ; readonly preferences ? : ts . UserPreferences ; } export type RenameLocationsOptions = readonly RenameLocationOptions [ ] | { readonly findInStrings ? : boolean ; readonly findInComments ? : boolean ; readonly ranges : readonly RenameLocationOptions [ ] ; readonly providePrefixAndSuffixTextForRename ? : boolean ; } ; export interface DiagnosticIgnoredInterpolations { template : string ; } ; export type RenameLocationOptions = FourSlash . Range | { readonly range : FourSlash . Range ; readonly prefixText ? : string ; readonly suffixText ? : string ; } ; export interface RenameOptions { readonly findInStrings ? : boolean ; readonly findInComments ? : boolean ; readonly providePrefixAndSuffixTextForRename ? : boolean ; } ; }