Restore NewFileContent type (#25406)

This commit is contained in:
Andy 2018-07-03 13:36:45 -07:00 committed by GitHub
parent 75369cd887
commit e1a7f8497e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -178,7 +178,7 @@ declare namespace FourSlashInterface {
isInCommentAtPosition(onlyMultiLineDiverges?: boolean): void; isInCommentAtPosition(onlyMultiLineDiverges?: boolean): void;
codeFix(options: { codeFix(options: {
description: string, description: string,
newFileContent?: string | { readonly [fileName: string]: string }, newFileContent?: NewFileContent,
newRangeContent?: string, newRangeContent?: string,
errorCode?: number, errorCode?: number,
index?: number, index?: number,
@ -357,7 +357,7 @@ declare namespace FourSlashInterface {
enableFormatting(): void; enableFormatting(): void;
disableFormatting(): void; disableFormatting(): void;
applyRefactor(options: { refactorName: string, actionName: string, actionDescription: string, newContent: string }): void; applyRefactor(options: { refactorName: string, actionName: string, actionDescription: string, newContent: NewFileContent }): void;
} }
class debug { class debug {
printCurrentParameterHelp(): void; printCurrentParameterHelp(): void;
@ -626,6 +626,7 @@ declare namespace FourSlashInterface {
} }
type ArrayOrSingle<T> = T | ReadonlyArray<T>; type ArrayOrSingle<T> = T | ReadonlyArray<T>;
type NewFileContent = string | { readonly [fileName: string]: string };
} }
declare function verifyOperationIsCancelled(f: any): void; declare function verifyOperationIsCancelled(f: any): void;
declare var test: FourSlashInterface.test_; declare var test: FourSlashInterface.test_;