mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Fix refactoring misses
This commit is contained in:
6 files changed
+6
-6
No files matched your search
@@ -2064,7 +2064,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
const startLine = sourceFile.getLineAndCharacterOfPosition(node.getEnd()).line;
|
||||
const endLine = sourceFile.getLineAndCharacterOfPosition(node.getStart(sourceFile)).line;
|
||||
const endLine = sourceFile.getLineAndCharacterOfPosition(nextToken.getStart(sourceFile)).line;
|
||||
return startLine !== endLine;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
// @noImplicitAny: true
|
||||
////function wrap( [| arr |] ) {
|
||||
//// arr.sort(function (a: number, b: number) { return a < b ? -1 : 1 })
|
||||
//// arr.sort(function (a: number, b: number) { return a < b ? -1 : 1 });
|
||||
//// }
|
||||
|
||||
// https://github.com/Microsoft/TypeScript/issues/29330
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
////declare module 'bar'
|
||||
////type T = { x: string, y: number }
|
||||
|
||||
format.setFormatOptions({ ...format.copyFormatOptions(), insertTrailingSemicolon: true });
|
||||
format.setFormatOptions({ ...format.copyFormatOptions(), semicolons: ts.SemicolonPreference.Insert });
|
||||
format.document();
|
||||
verify.currentFileContentIs(`console.log(1);
|
||||
console.log(2);
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
//// ();
|
||||
////}
|
||||
|
||||
format.setFormatOptions({ ...format.copyFormatOptions(), insertTrailingSemicolon: false });
|
||||
format.setFormatOptions({ ...format.copyFormatOptions(), semicolons: ts.SemicolonPreference.Remove });
|
||||
format.document();
|
||||
verify.currentFileContentIs(`; (function f() { })()
|
||||
const a = 3;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
////}
|
||||
////let z = 0; //
|
||||
|
||||
format.setFormatOptions({ ...format.copyFormatOptions(), insertTrailingSemicolon: false });
|
||||
format.setFormatOptions({ ...format.copyFormatOptions(), semicolons: ts.SemicolonPreference.Remove });
|
||||
format.document();
|
||||
verify.currentFileContentIs(`namespace ts {
|
||||
let x = 0
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
////// Start with signatures at empty array in case of recursive types
|
||||
////(<InterfaceTypeWithDeclaredMembers>type).declaredCallSignatures = emptyArray;
|
||||
|
||||
format.setFormatOptions({ ...format.copyFormatOptions(), insertTrailingSemicolon: false });
|
||||
format.setFormatOptions({ ...format.copyFormatOptions(), semicolons: ts.SemicolonPreference.Remove });
|
||||
format.document();
|
||||
verify.currentFileContentIs(`(<InterfaceTypeWithDeclaredMembers>type).declaredProperties = getNamedMembers(members);
|
||||
// Start with signatures at empty array in case of recursive types
|
||||
|
||||
Reference in new issue
Block a user