fixed tslint issues

This commit is contained in:
Umed Khudoiberdiev 2017-01-26 16:47:10 +05:00
parent a4e5abe161
commit 5f8bf5ee13
90 changed files with 89 additions and 91 deletions

View File

@ -47,4 +47,4 @@ createConnection(options).then(connection => {
.then(post => console.log("Post has been saved: ", post))
.catch(error => console.log("Cannot save. Error: ", error));
}, error => console.log("Cannot connect: ", error));
}, error => console.log("Cannot connect: ", error));

View File

@ -179,4 +179,4 @@ createConnection(options).then(connection => {
.then(post => console.log("Post has been saved"))
.catch(error => console.log("Cannot save. Error: ", error));*/
}).catch(error => console.log(error.stack ? error.stack : error));
}).catch(error => console.log(error.stack ? error.stack : error));

View File

@ -93,4 +93,4 @@ createConnection(options).then(connection => {
})
.catch(error => console.log("Cannot save. Error: ", error, error.stack));
}, error => console.log("Cannot connect: ", error));
}, error => console.log("Cannot connect: ", error));

View File

@ -31,4 +31,4 @@ createConnection(options).then(connection => {
.then(post => console.log("Post has been saved"))
.catch(error => console.log("Cannot save. Error: ", error));
}, error => console.log("Cannot connect: ", error));
}, error => console.log("Cannot connect: ", error));

View File

@ -81,4 +81,4 @@ createConnection(options).then(connection => {
})
.catch(error => console.log("Cannot save. Error: ", error.stack ? error.stack : error));
}, error => console.log("Cannot connect: ", error.stack ? error.stack : error));
}, error => console.log("Cannot connect: ", error.stack ? error.stack : error));

View File

@ -33,4 +33,4 @@ createConnection(options).then(connection => {
.then(post => console.log("Post has been saved"))
.catch(error => console.log("Cannot save. Error: ", error));
}, error => console.log("Cannot connect: ", error));
}, error => console.log("Cannot connect: ", error));

View File

@ -41,4 +41,4 @@ createConnection(options).then(connection => {
.persist(post)
.then(post => console.log("Post has been saved"));
}, error => console.log("Cannot connect: ", error));
}, error => console.log("Cannot connect: ", error));

View File

@ -39,4 +39,4 @@ createConnection(options).then(connection => {
console.log(`Post has been updated. Post's version is ${post.version}`);
});
}, error => console.log("Cannot connect: ", error));
}, error => console.log("Cannot connect: ", error));

View File

@ -108,4 +108,4 @@ createConnection(options).then(connection => {
})
.catch(error => console.log(error.stack));
}, error => console.log("Cannot connect: ", error));
}, error => console.log("Cannot connect: ", error));

View File

@ -129,4 +129,4 @@ createConnection(options).then(connection => {
})
.catch(error => console.log(error.stack));
}, error => console.log("Cannot connect: ", error));
}, error => console.log("Cannot connect: ", error));

View File

@ -53,4 +53,4 @@ createConnection(options).then(connection => {
})
.catch(error => console.log("Cannot save. Error: ", error));
}, error => console.log("Cannot connect: ", error));
}, error => console.log("Cannot connect: ", error));

View File

@ -130,4 +130,4 @@ createConnection(options).then(connection => {
})
.catch(error => console.log(error.stack));
}, error => console.log("Cannot connect: ", error));
}, error => console.log("Cannot connect: ", error));

View File

@ -54,4 +54,4 @@ createConnection(options).then(connection => {
})
.catch(error => console.log(error.stack));
}, error => console.log("Cannot connect: ", error));
}, error => console.log("Cannot connect: ", error));

View File

@ -117,4 +117,4 @@ createConnection(options).then(connection => {
.catch(error => console.log(error.stack));
*/
}, error => console.log("Cannot connect: ", error));
}, error => console.log("Cannot connect: ", error));

View File

@ -123,4 +123,4 @@ createConnection(options).then(connection => {
})
.catch(error => console.log(error.stack));
}, error => console.log("Cannot connect: ", error));
}, error => console.log("Cannot connect: ", error));

View File

@ -45,4 +45,4 @@ createConnection(options).then(connection => {
})
.catch(error => console.log(error.stack ? error.stack : error));
}).catch(error => console.log(error.stack ? error.stack : error));
}).catch(error => console.log(error.stack ? error.stack : error));

View File

@ -59,4 +59,4 @@ createConnection(options).then(connection => {
})
.catch(error => console.log(error.stack));
}, error => console.log("Cannot connect: ", error));
}, error => console.log("Cannot connect: ", error));

View File

@ -54,4 +54,4 @@ createConnection(options).then(connection => {
})
.catch(e => console.log(e));
}, error => console.log("Cannot connect: ", error));
}, error => console.log("Cannot connect: ", error));

View File

@ -36,4 +36,4 @@ createConnection(options).then(async connection => {
const loadedPost = await postRepository.findOneById({ id: 1, type: "person" });
console.log("loaded post: ", loadedPost);
}, error => console.log("Error: ", error));
}, error => console.log("Error: ", error));

View File

@ -96,4 +96,4 @@ createConnection(options).then(async connection => {
console.log("Non exist student: ", thirdStudent);
}, error => console.log("Error: ", error));
}, error => console.log("Error: ", error));

View File

@ -111,4 +111,4 @@ createConnection(options).then(async connection => {
const thirdStudent = await studentRepository.findOneById(2);
console.log("Non exist student: ", thirdStudent);*/
}).catch(error => console.log("Error: ", error));
}).catch(error => console.log("Error: ", error));

View File

@ -48,4 +48,4 @@ createConnection(options).then(connection => {
.then(post => console.log("Post has been saved"))
.catch(error => console.log("Cannot save. Error: ", error));
}).catch(error => console.log("Error: ", error));
}).catch(error => console.log("Error: ", error));

View File

@ -48,4 +48,4 @@ createConnection(options).then(async connection => {
const allPosts = await postRepository.find();
console.log(allPosts);
}).catch(error => console.log("Error: ", error));
}).catch(error => console.log("Error: ", error));

View File

@ -42,4 +42,4 @@ createConnection(options).then(async connection => {
await postRepository.persist(post);
console.log("Post has been saved");
}).catch(error => console.log("Error: ", error));
}).catch(error => console.log("Error: ", error));

View File

@ -71,4 +71,4 @@ createConnection(options).then(async connection => {
console.log("Done. We run two migrations then reverted them.");
}).catch(error => console.log("Error: ", error));
}).catch(error => console.log("Error: ", error));

View File

@ -52,4 +52,4 @@ createConnection(options).then(async connection => {
console.log("Author persisted! Loaded author: ", loadedAuthor);
}).catch(error => console.log("Error: ", error));
}).catch(error => console.log("Error: ", error));

View File

@ -38,4 +38,4 @@ createConnection(options).then(connection => {
.then(post => console.log("Post has been saved"))
.catch(error => console.log("Cannot save. Error: ", error));
}, error => console.log("Cannot connect: ", error));
}, error => console.log("Cannot connect: ", error));

View File

@ -73,4 +73,4 @@ createConnection(options).then(connection => {
})
.catch(error => console.log("Cannot save. Error: ", error.stack ? error.stack : error));
}, error => console.log("Cannot connect: ", error.stack ? error.stack : error));
}, error => console.log("Cannot connect: ", error.stack ? error.stack : error));

View File

@ -73,4 +73,4 @@ createConnection(options).then(connection => {
})
.catch(error => console.log("Cannot save. Error: ", error.stack ? error.stack : error));
}, error => console.log("Cannot connect: ", error.stack ? error.stack : error));
}, error => console.log("Cannot connect: ", error.stack ? error.stack : error));

View File

@ -72,4 +72,4 @@ createConnection(options).then(connection => {
})
.catch(error => console.log("Cannot save. Error: ", error.stack ? error.stack : error));
}, error => console.log("Cannot connect: ", error.stack ? error.stack : error));
}, error => console.log("Cannot connect: ", error.stack ? error.stack : error));

View File

@ -33,4 +33,4 @@ createConnection(options).then(connection => {
})
.catch(error => console.log("Cannot save. Error: ", error.stack ? error.stack : error));
}, error => console.log("Cannot connect: ", error.stack ? error.stack : error));
}, error => console.log("Cannot connect: ", error.stack ? error.stack : error));

View File

@ -71,4 +71,4 @@ createConnection(options).then(connection => {
})
.catch(error => console.log("Cannot save. Error: ", error.stack ? error.stack : error));
}, error => console.log("Cannot connect: ", error.stack ? error.stack : error));
}, error => console.log("Cannot connect: ", error.stack ? error.stack : error));

View File

@ -30,4 +30,4 @@ require("yargs")
.alias("v", "version")
.help("h")
.alias("h", "help")
.argv;
.argv;

View File

@ -1,4 +1,4 @@
/**
* Represents some Type of the Object.
*/
export type ObjectType<T> = { new (): T }|Function;
export type ObjectType<T> = { new (): T }|Function;

View File

@ -1 +1 @@
export type OrderByCondition = { [columnName: string]: "ASC"|"DESC" };
export type OrderByCondition = { [columnName: string]: "ASC"|"DESC" };

View File

@ -45,4 +45,4 @@ describe.skip("cascades > should insert by cascades from both sides (#57)", () =
})));
});
});

View File

@ -203,4 +203,4 @@ describe("ConnectionManager", () => {
});
});
});

View File

@ -410,4 +410,4 @@ describe("Connection", () => {
});
});
});
});

View File

@ -120,4 +120,4 @@ describe("decorators > embedded", () => {
});
});
});

View File

@ -81,4 +81,4 @@ describe("QueryBuilder > relation-count", () => {
});
});
});

View File

@ -99,4 +99,4 @@ describe("QueryBuilder > relation-id", () => {
});
});
});

View File

@ -65,4 +65,4 @@ describe("embedded > basic functionality", () => {
});
});
});

View File

@ -25,4 +25,4 @@ describe("indices > basic unique index test", () => {
});
});
});

View File

@ -55,4 +55,4 @@ describe("jsonb type", () => {
expect(foundRecord).to.be.not.undefined;
expect(foundRecord!.data).to.deep.include.members([1, "2", { a: 3 }]);
})));
});
});

View File

@ -222,4 +222,4 @@ describe("lazy-relations", () => {
loadedCategory.name.should.be.equal("category of great post");
})));
});
});

View File

@ -208,4 +208,4 @@ describe("persistence > cascade operations", () => {
});
});
});

View File

@ -52,4 +52,4 @@ describe("persistence > cascade operations with custom name", () => {
});
});
});

View File

@ -241,4 +241,4 @@ describe("persistence > custom-column-names", function() {
});
});
});

View File

@ -82,4 +82,4 @@ describe.skip("persistence > insert operations", () => {
});
});
});

View File

@ -33,4 +33,4 @@ describe("persistence > insert > update-relation-columns-after-insertion", () =>
})));
});
});

View File

@ -63,4 +63,4 @@ describe("persistence > many-to-many", function() {
})));
});
});

View File

@ -55,4 +55,4 @@ describe("persistence > multi primary keys", () => {
}]);
})));
});
});
});

View File

@ -62,4 +62,4 @@ describe("persistence > multi primary keys", () => {
})));
});
});
});

View File

@ -175,4 +175,4 @@ describe("persistence > one-to-many", function() {
});
});
});

View File

@ -69,4 +69,4 @@ describe("persistence > order of persistence execution operations", () => {
});
});

View File

@ -45,4 +45,4 @@ describe.skip("relations > relation mapped to relation with different name (#56)
}]);
})));
});
});

View File

@ -67,4 +67,4 @@ describe.skip("relations > relation with primary key", () => {
});
});
});

View File

@ -17,4 +17,4 @@ export default {
target: function Question() {
this.type = "question";
}
};
};

View File

@ -449,4 +449,4 @@ describe("repository > basic methods", () => {
});
});
});

View File

@ -93,4 +93,4 @@ describe("repository > removeById and removeByIds methods", function() {
expect(loadedPosts.find(p => p.id === 4)).not.to.be.empty;
})));
});
});

View File

@ -373,4 +373,4 @@ describe("repository > find methods", () => {
});
});
});

View File

@ -302,4 +302,4 @@ describe("repository > set/add/remove relation methods", function() {
})));
});
});

View File

@ -118,4 +118,4 @@ describe("transaction > method wrapped into transaction decorator", () => {
})));
});
});

View File

@ -101,4 +101,4 @@ describe("transaction > transaction with entity manager", () => {
})));
});
});

View File

@ -152,4 +152,4 @@ describe("closure-table", () => {
})));
});
});

View File

@ -20,4 +20,4 @@ describe("github issues > #108 Error with constraint names on postgres", () => {
expect(true).is.true;
})));
});
});

View File

@ -99,8 +99,6 @@ describe("github issues > #151 joinAndSelect can't find entity from inverse side
post.metadata = null;
console.log("-------------------------------------------------");
await connection.entityManager.persist(post);
const loadedPostWithMetadata = await connection.entityManager.findOneById(Post, 1, {

View File

@ -56,4 +56,4 @@ describe("github issues > #174 Embeded types confusing with order by", () => {
}]);
})));
});
});

View File

@ -111,4 +111,4 @@ describe("github issues > #175 ManyToMany relation doesn't put an empty array wh
});
})));
});
});

View File

@ -45,4 +45,4 @@ describe("github issues > #176 @CreateDateColumn and @UpdateDateColumn does not
localDate.toISOString().should.be.equal("2017-01-10T17:38:06.000Z");
})));
});
});

View File

@ -75,4 +75,4 @@ describe("github issues > #182 enums are not saved properly", () => {
})));
});
});

View File

@ -32,4 +32,4 @@ describe("github issues > #190 too many SQL variables when using setMaxResults i
loadedPosts.length.should.be.equal(1000);
})));
});
});

View File

@ -39,4 +39,4 @@ describe("github issues > #211 where in query issue", () => {
loadedPosts2.length.should.be.equal(3);
})));
});
});

View File

@ -43,4 +43,4 @@ describe("github issues > #215 invalid replacements of join conditions", () => {
loadedPosts.length.should.be.equal(1);
})));
});
});

View File

@ -156,4 +156,4 @@ describe("github issues > #234 and #223 lazy loading does not work correctly fro
})));
});
});

View File

@ -69,4 +69,4 @@ describe("github issues > #47 wrong sql syntax when loading lazy relation", () =
})));
});
});

View File

@ -40,4 +40,4 @@ describe.skip("github issues > #56 relationships only work when both primary key
})));
});
});

View File

@ -104,4 +104,4 @@ describe("github issues > #57 cascade insert not working with OneToOne relations
})));
});
});

View File

@ -74,4 +74,4 @@ describe("github issues > #58 relations with multiple primary keys", () => {
})));
});
});

View File

@ -72,4 +72,4 @@ describe("github issues > #70 cascade deleting works incorrect", () => {
})));
});
});

View File

@ -51,4 +51,4 @@ describe("github issues > #71 ManyToOne relation with custom column name persist
});
})));
});
});

View File

@ -46,4 +46,4 @@ describe("github issues > #78 repository 'create' is skipping inherited fields",
})));
});
});

View File

@ -31,4 +31,4 @@ describe("github issues > #80 repository.persist fails when empty array is sent
returnedPosts.should.be.equal(posts);
})));
});
});

View File

@ -43,4 +43,4 @@ describe("insertion", function() {
});
})));
});
});

View File

@ -418,4 +418,4 @@ describe("one-to-one", function() {
});
});
});

View File

@ -487,4 +487,4 @@ describe("many-to-one", function() {
});
});
});

View File

@ -558,4 +558,4 @@ describe("many-to-many", function() {
});
});
});

View File

@ -44,4 +44,4 @@ describe("other issues > entity change in listeners should affect persistence",
})));
});
});

View File

@ -60,4 +60,4 @@ describe("other issues > joining empty relations", () => {
})));
});
});

View File

@ -60,4 +60,4 @@ describe("other issues > using limit in conjunction with order by", () => {
})));
});
});