Clean up TODOs for #18445

This commit is contained in:
Andrew Casey 2018-01-17 15:29:41 -08:00
parent db3f7c538e
commit 3ca1cc406a
72 changed files with 2 additions and 75 deletions

View File

@ -2568,9 +2568,7 @@ Actual: ${stringify(fullActual)}`);
const originalContent = scriptInfo.content;
for (const codeFix of codeFixes) {
this.applyEdits(codeFix.changes[0].fileName, codeFix.changes[0].textChanges, /*isFormattingEdit*/ false);
let text = this.rangeText(ranges[0]);
// TODO:GH#18445 (remove this line to see errors in many `importNameCodeFix` tests)
text = text.replace(/\r\n/g, "\n");
const text = this.rangeText(ranges[0]);
actualTextArray.push(text);
scriptInfo.updateContent(originalContent);
}

View File

@ -9,7 +9,6 @@
verify.codeFix({
description: "Declare property 'foo'",
index: 0,
// TODO: GH#18445
newFileContent: `class C {
foo: number;
method() {

View File

@ -9,7 +9,6 @@
verify.codeFix({
description: "Add index signature for property 'foo'",
index: 1,
// TODO: GH#18445
newFileContent: `class C {
[x: string]: number;
method() {

View File

@ -9,7 +9,6 @@
verify.codeFix({
description: "Declare static property 'foo'",
index: 0,
// TODO: GH#18445
newFileContent: `class C {
static foo: number;
static method() {

View File

@ -15,7 +15,6 @@
verify.codeFix({
description: "Initialize property 'foo' in the constructor",
index: 0,
// TODO: GH#18445
newFileContent: `class C {
constructor() {
this.foo = undefined;

View File

@ -13,7 +13,6 @@
verify.codeFix({
description: "Initialize static property 'foo'",
index: 0,
// TODO: GH#18445
newFileContent: `class C {
static method() {
()=>{ this.foo === 10 };

View File

@ -13,7 +13,6 @@
verify.codeFix({
description: "Initialize property 'foo' in the constructor",
index: 0,
// TODO: GH#18445
newFileContent: `class C {
constructor() {
this.foo = undefined;

View File

@ -11,7 +11,6 @@
verify.codeFix({
description: "Initialize static property 'foo'",
index: 2,
// TODO: GH#18445
newFileContent: `class C {
static p = ()=>{ this.foo === 10 };
}

View File

@ -11,7 +11,6 @@
verify.codeFixAll({
fixId: "addMissingMember",
newFileContent:
// TODO: GH#18445
`class C {
x: number;
y(): any {

View File

@ -16,7 +16,6 @@
verify.codeFixAll({
fixId: "addMissingMember",
newFileContent:
// TODO: GH#18445
`class C {
y() {
throw new Error("Method not implemented.");

View File

@ -8,7 +8,6 @@
verify.codeFixAll({
fixId: "fixClassDoesntImplementInheritedAbstractMember",
// TODO: GH#18445
newFileContent:
`abstract class A {
abstract m(): void;

View File

@ -8,7 +8,6 @@
verify.codeFix({
description: "Implement inherited abstract class",
// TODO: GH#18445
newFileContent:
`abstract class A {
abstract x: this;

View File

@ -8,7 +8,6 @@
verify.codeFix({
description: "Implement inherited abstract class",
// TODO: GH#18445
newFileContent:
`abstract class A {
protected abstract x: number;

View File

@ -8,7 +8,6 @@
verify.codeFix({
description: "Implement inherited abstract class",
// TODO: GH#18445
newFileContent:
`abstract class A {
public abstract x: number;

View File

@ -15,7 +15,6 @@
verify.codeFix({
description: "Implement interface 'A'",
// TODO: GH#18445
newFileContent:
`abstract class A {
private _a: string;

View File

@ -8,7 +8,6 @@
verify.codeFix({
description: "Implement interface 'A'",
// TODO: GH#18445
newFileContent:
`class A {
f() {}

View File

@ -8,7 +8,6 @@
verify.codeFix({
description: "Implement interface 'A'",
// TODO: GH#18445
newFileContent:
`class A {
method(a: number, b: string): boolean;

View File

@ -10,7 +10,6 @@
verify.codeFix({
description: "Implement interface 'A'",
// TODO: GH#18445
newFileContent:
`class A {
method(a: any, b: string): boolean;

View File

@ -11,7 +11,6 @@
verify.codeFix({
description: "Implement interface 'A'",
// TODO: GH#18445
newFileContent:
`abstract class A {
abstract x: number;

View File

@ -7,7 +7,6 @@
verify.codeFix({
description: "Implement interface 'A'",
// TODO: GH#18445
newFileContent:
`class A {
A: typeof A;

View File

@ -50,7 +50,6 @@
verify.codeFix({
description: "Implement interface 'I6'",
// TODO: GH#18445
newFileContent:
`// Referenced throughout the inheritance chain.
interface I0 { a: number }

View File

@ -5,7 +5,6 @@
verify.codeFix({
description: "Implement interface 'I'",
// TODO: GH#18445
newFileContent:
`interface I { x: number; }
export default class implements I {

View File

@ -10,7 +10,6 @@
verify.codeFix({
description: "Implement interface 'I'",
// TODO: GH#18445
newFileContent:
`interface I {
x: number[];

View File

@ -6,7 +6,6 @@
verify.codeFix({
description: "Implement interface 'I'",
// TODO: GH#18445
newFileContent:
`interface I { x: number; }
new class implements I {

View File

@ -20,7 +20,6 @@
verify.codeFix({
description: "Implement interface 'N.I'",
// TODO: GH#18445
newFileContent:
`namespace N {
/**enum prefix */

View File

@ -11,7 +11,6 @@
verify.codeFix({
description: "Implement interface 'I'",
// TODO: GH#18445
newFileContent:
`interface I {
["foo"](o: any): boolean;

View File

@ -21,7 +21,6 @@
verify.codeFix({
description: "Implement interface 'I<number>'",
// TODO: GH#18445
newFileContent:
`interface I<Species> {
[Symbol.hasInstance](o: any): boolean;

View File

@ -13,7 +13,6 @@
verify.codeFix({
description: "Implement interface 'N1.I1'",
// TODO: GH#18445
newFileContent:
`namespace N1 {
export interface I1 {

View File

@ -10,7 +10,6 @@
verify.codeFix({
description: "Implement interface 'I'",
// TODO: GH#18445
newFileContent:
`interface I {
[x: number]: I;

View File

@ -7,7 +7,6 @@
verify.codeFix({
description: "Implement interface 'I'",
// TODO: GH#18445
newFileContent:
`interface I {
[x: number]: I;

View File

@ -8,7 +8,6 @@
verify.codeFix({
description: "Implement interface 'I<number>'",
// TODO: GH#18445
newFileContent:
`interface I<X> {
[Ƚ: string]: X;

View File

@ -7,7 +7,6 @@
verify.codeFix({
description: "Implement interface 'I<Y>'",
// TODO: GH#18445
newFileContent:
`interface I<X> {
x: keyof X;

View File

@ -9,7 +9,6 @@
verify.codeFix({
description: "Implement interface 'I1'",
// TODO: GH#18445
newFileContent:
`abstract class C1 { }
abstract class C2 {

View File

@ -7,7 +7,6 @@
verify.codeFix({
description: "Implement interface 'I<Y>'",
// TODO: GH#18445
newFileContent:
`interface I<X> {
x: { readonly [K in keyof X]: X[K] };

View File

@ -9,7 +9,6 @@
verify.codeFix({
description: "Implement interface 'I'",
// TODO: GH#18445
newFileContent:
`type Either<T> = { val: T } | Error;
interface I {

View File

@ -33,7 +33,6 @@
verify.codeFix({
description: "Implement interface 'I'",
// TODO: GH#18445
newFileContent:
`/** asdf */
interface I {

View File

@ -6,7 +6,6 @@
verify.codeFix({
description: "Implement interface 'I'",
// TODO: GH#18445
newFileContent:
`type MyType = [string, number];
interface I { x: MyType; test(a: MyType): void; }

View File

@ -8,7 +8,6 @@
verify.codeFix({
description: "Implement interface 'I'",
// TODO: GH#18445
newFileContent:
`interface I {
f(x: number, y: this): I

View File

@ -9,7 +9,6 @@
verify.codeFix({
description: "Implement interface 'I'",
// TODO: GH#18445
newFileContent:
`interface I {
f(i: any): i is I;

View File

@ -13,7 +13,6 @@
verify.codeFix({
description: "Implement interface 'I1'",
// TODO: GH#18445
newFileContent:
`interface I1 {
x: number,

View File

@ -10,7 +10,6 @@
verify.codeFix({
description: "Implement interface 'I'",
// TODO: GH#18445
newFileContent:
`interface I {
method(a: number, b: string): boolean;

View File

@ -10,7 +10,6 @@
verify.codeFix({
description: "Implement interface 'I'",
// TODO: GH#18445
newFileContent:
`interface I {
method(a: number, ...b: string[]): boolean;

View File

@ -10,7 +10,6 @@
verify.codeFix({
description: "Implement interface 'I'",
// TODO: GH#18445
newFileContent:
`interface I {
method(a: number, ...b: string[]): boolean;

View File

@ -10,7 +10,6 @@
verify.codeFix({
description: "Implement interface 'N1.I1'",
// TODO: GH#18445
newFileContent:
`namespace N1 {
export interface I1 { x: number; }

View File

@ -8,7 +8,6 @@
verify.codeFix({
description: "Implement interface 'IPerson'",
// TODO: GH#18445
newFileContent:
`interface IPerson {
name: string;

View File

@ -13,7 +13,6 @@
verify.codeFix({
description: "Implement interface 'I'",
// TODO: GH#18445
newFileContent:
`enum E { a,b,c }
interface I {

View File

@ -21,7 +21,6 @@
verify.codeFix({
description: "Implement interface 'I'",
// TODO: GH#18445
newFileContent:
`interface I {
a0: {};

View File

@ -7,7 +7,6 @@
verify.codeFix({
description: "Implement interface 'N.I'",
// TODO: GH#18445
newFileContent:
`namespace N {
export interface I { y: I; }

View File

@ -7,7 +7,6 @@
verify.codeFix({
description: "Implement interface 'I<number>'",
// TODO: GH#18445
newFileContent:
`interface I<T> {
x: { y: T, z: T[] };

View File

@ -5,7 +5,6 @@
verify.codeFix({
description: "Implement interface 'I<number>'",
// TODO: GH#18445
newFileContent:
`interface I<T> { x: T; }
class C implements I<number> {

View File

@ -5,7 +5,6 @@
verify.codeFix({
description: "Implement interface 'I<T>'",
// TODO: GH#18445
newFileContent:
`interface I<T> { x: T; }
class C<T> implements I<T> {

View File

@ -5,7 +5,6 @@
verify.codeFix({
description: "Implement interface 'I<U>'",
// TODO: GH#18445
newFileContent:
`interface I<T> { x: T; }
class C<U> implements I<U> {

View File

@ -8,7 +8,6 @@
verify.codeFix({
description: "Implement interface 'I'",
newFileContent:
// TODO: GH#18445
`interface I {
f<T extends number>(x: T);
}

View File

@ -7,7 +7,7 @@
verify.codeFixAll({
fixId: "fixClassIncorrectlyImplementsInterface",
// TODO: GH#20073 GH#18445
// TODO: GH#20073
newFileContent:
`interface I { i(): void; }
interface J { j(): void; }

View File

@ -9,7 +9,6 @@
//// super();
//// |]}
////}
// TODO: GH#18445
verify.rangeAfterCodeFix(`
super();
this.a = 12;

View File

@ -8,7 +8,6 @@
verify.codeFix({
description: "Add missing 'super()' call",
// TODO: GH#18445
newFileContent:
`class Base{
}

View File

@ -9,7 +9,6 @@
verify.codeFixAll({
fixId: "constructorForDerivedNeedSuperCall",
// TODO: GH#18445
newFileContent: `class C extends Object {
constructor() {
super();

View File

@ -12,7 +12,6 @@
verify.codeFix({
description: "Declare static method 'm1'",
index: 0,
// TODO: GH#18445
newRangeContent: `
static m1(arg0: any, arg1: any, arg2: any): any {
throw new Error("Method not implemented.");

View File

@ -13,7 +13,6 @@
verify.codeFix({
description: "Declare method 'foo1'",
index: 0,
// TODO: GH#18445
newRangeContent: `
foo1(arg0: any, arg1: any, arg2: any): any {
throw new Error("Method not implemented.");

View File

@ -17,7 +17,6 @@ verify.applyCodeActionFromCompletion("", {
name: "foo",
source: "/a",
description: `Import 'foo' from module "./a"`,
// TODO: GH#18445
newFileContent: `import f_o_o from "./a";
import foo from "./a";
f;`,

View File

@ -22,7 +22,6 @@ verify.applyCodeActionFromCompletion("1", {
name: "fooBar",
source: "/src/foo-bar",
description: `Import 'fooBar' from module "./foo-bar"`,
// TODO: GH#18445
newFileContent: `import fooBar from "./foo-bar";
def

View File

@ -18,7 +18,6 @@ verify.applyCodeActionFromCompletion("", {
name: "foo",
source: "/a",
description: `Import 'foo' from module "./a"`,
// TODO: GH#18445
newFileContent: `import foo from "./a";
f;`,

View File

@ -19,7 +19,6 @@ verify.applyCodeActionFromCompletion("", {
name: "foo",
source: "/a",
description: `Import 'foo' from module "./a"`,
// TODO: GH#18445
newFileContent: `import foo from "./a";
f;`,

View File

@ -12,7 +12,6 @@ verify.applyCodeActionFromCompletion("", {
name: "x",
source: "m",
description: `Import 'x' from module "m"`,
// TODO: GH#18445
newFileContent: `import { x } from "m";
`,

View File

@ -23,7 +23,6 @@ verify.applyCodeActionFromCompletion("", {
name: "foo",
source: "/b",
description: `Import 'foo' from module "./b"`,
// TODO: GH#18445
newFileContent: `import { foo } from "./b";
fo`,

View File

@ -19,7 +19,6 @@ verify.applyCodeActionFromCompletion("", {
name: "foo",
source: "/a",
description: `Import 'foo' from module "./a"`,
// TODO: GH#18445
newFileContent: `import { foo } from "./a";
f;`,

View File

@ -17,7 +17,6 @@ verify.applyCodeActionFromCompletion("", {
name: "foo",
source: "/a",
description: `Change 'foo' to 'a.foo'`,
// TODO: GH#18445
newFileContent: `import * as a from "./a";
a.f;`,
});

View File

@ -29,7 +29,6 @@ verify.applyCodeActionFromCompletion("", {
name: "foo",
source: "/a",
description: `Import 'foo' from module "./a"`,
// TODO: GH#18445
newFileContent: `import { foo } from "./a";
fo`,

View File

@ -24,7 +24,6 @@ verify.applyCodeActionFromCompletion("", {
name: "foo",
source: "/foo/lib/foo",
description: `Import 'foo' from module "./foo"`,
// TODO: GH#18445
newFileContent: `import { foo } from "./foo";
fo`,

View File

@ -23,7 +23,6 @@ verify.applyCodeActionFromCompletion("b", {
name: "foo",
source: "/a",
description: `Import 'foo' from module "./a"`,
// TODO: GH#18445
newFileContent: `import { foo } from "./a";
const a = require("./a");
@ -40,7 +39,6 @@ verify.applyCodeActionFromCompletion("c", {
name: "foo",
source: "/a",
description: `Import 'foo' from module "./a"`,
// TODO: GH#18445
newFileContent: `import { foo } from "./a";
const a = import("./a");

View File

@ -10,7 +10,6 @@
////x;|]
goTo.file("/b.ts");
// TODO:GH#18445
verify.rangeAfterCodeFix(`import { x } from "./a";
export { x } from "./a";

View File

@ -14,7 +14,6 @@
verify.applicableRefactorAvailableAtMarker('1');
// NOTE: '// Comment' should be included, but due to incorrect handling of trivia,
// it's omitted right now.
// TODO: GH#18445
verify.fileAfterApplyingRefactorAtMarker('1',
`class fn {\r
constructor() {\r