mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
fixed tslint issues
This commit is contained in:
parent
a4e5abe161
commit
5f8bf5ee13
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -30,4 +30,4 @@ require("yargs")
|
||||
.alias("v", "version")
|
||||
.help("h")
|
||||
.alias("h", "help")
|
||||
.argv;
|
||||
.argv;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/**
|
||||
* Represents some Type of the Object.
|
||||
*/
|
||||
export type ObjectType<T> = { new (): T }|Function;
|
||||
export type ObjectType<T> = { new (): T }|Function;
|
||||
|
||||
@ -1 +1 @@
|
||||
export type OrderByCondition = { [columnName: string]: "ASC"|"DESC" };
|
||||
export type OrderByCondition = { [columnName: string]: "ASC"|"DESC" };
|
||||
|
||||
@ -45,4 +45,4 @@ describe.skip("cascades > should insert by cascades from both sides (#57)", () =
|
||||
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -203,4 +203,4 @@ describe("ConnectionManager", () => {
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -410,4 +410,4 @@ describe("Connection", () => {
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -120,4 +120,4 @@ describe("decorators > embedded", () => {
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -81,4 +81,4 @@ describe("QueryBuilder > relation-count", () => {
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -99,4 +99,4 @@ describe("QueryBuilder > relation-id", () => {
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -65,4 +65,4 @@ describe("embedded > basic functionality", () => {
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -25,4 +25,4 @@ describe("indices > basic unique index test", () => {
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -55,4 +55,4 @@ describe("jsonb type", () => {
|
||||
expect(foundRecord).to.be.not.undefined;
|
||||
expect(foundRecord!.data).to.deep.include.members([1, "2", { a: 3 }]);
|
||||
})));
|
||||
});
|
||||
});
|
||||
|
||||
@ -222,4 +222,4 @@ describe("lazy-relations", () => {
|
||||
loadedCategory.name.should.be.equal("category of great post");
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -208,4 +208,4 @@ describe("persistence > cascade operations", () => {
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -52,4 +52,4 @@ describe("persistence > cascade operations with custom name", () => {
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -241,4 +241,4 @@ describe("persistence > custom-column-names", function() {
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -82,4 +82,4 @@ describe.skip("persistence > insert operations", () => {
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -33,4 +33,4 @@ describe("persistence > insert > update-relation-columns-after-insertion", () =>
|
||||
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -63,4 +63,4 @@ describe("persistence > many-to-many", function() {
|
||||
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -55,4 +55,4 @@ describe("persistence > multi primary keys", () => {
|
||||
}]);
|
||||
})));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@ -62,4 +62,4 @@ describe("persistence > multi primary keys", () => {
|
||||
|
||||
})));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@ -175,4 +175,4 @@ describe("persistence > one-to-many", function() {
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -69,4 +69,4 @@ describe("persistence > order of persistence execution operations", () => {
|
||||
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -45,4 +45,4 @@ describe.skip("relations > relation mapped to relation with different name (#56)
|
||||
}]);
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -67,4 +67,4 @@ describe.skip("relations > relation with primary key", () => {
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -17,4 +17,4 @@ export default {
|
||||
target: function Question() {
|
||||
this.type = "question";
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@ -449,4 +449,4 @@ describe("repository > basic methods", () => {
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -93,4 +93,4 @@ describe("repository > removeById and removeByIds methods", function() {
|
||||
expect(loadedPosts.find(p => p.id === 4)).not.to.be.empty;
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -373,4 +373,4 @@ describe("repository > find methods", () => {
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -302,4 +302,4 @@ describe("repository > set/add/remove relation methods", function() {
|
||||
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -118,4 +118,4 @@ describe("transaction > method wrapped into transaction decorator", () => {
|
||||
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -101,4 +101,4 @@ describe("transaction > transaction with entity manager", () => {
|
||||
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -152,4 +152,4 @@ describe("closure-table", () => {
|
||||
})));
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -20,4 +20,4 @@ describe("github issues > #108 Error with constraint names on postgres", () => {
|
||||
expect(true).is.true;
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -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, {
|
||||
|
||||
@ -56,4 +56,4 @@ describe("github issues > #174 Embeded types confusing with order by", () => {
|
||||
}]);
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -111,4 +111,4 @@ describe("github issues > #175 ManyToMany relation doesn't put an empty array wh
|
||||
});
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -45,4 +45,4 @@ describe("github issues > #176 @CreateDateColumn and @UpdateDateColumn does not
|
||||
localDate.toISOString().should.be.equal("2017-01-10T17:38:06.000Z");
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -75,4 +75,4 @@ describe("github issues > #182 enums are not saved properly", () => {
|
||||
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -32,4 +32,4 @@ describe("github issues > #190 too many SQL variables when using setMaxResults i
|
||||
loadedPosts.length.should.be.equal(1000);
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -39,4 +39,4 @@ describe("github issues > #211 where in query issue", () => {
|
||||
loadedPosts2.length.should.be.equal(3);
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -43,4 +43,4 @@ describe("github issues > #215 invalid replacements of join conditions", () => {
|
||||
loadedPosts.length.should.be.equal(1);
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -156,4 +156,4 @@ describe("github issues > #234 and #223 lazy loading does not work correctly fro
|
||||
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -69,4 +69,4 @@ describe("github issues > #47 wrong sql syntax when loading lazy relation", () =
|
||||
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -40,4 +40,4 @@ describe.skip("github issues > #56 relationships only work when both primary key
|
||||
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -104,4 +104,4 @@ describe("github issues > #57 cascade insert not working with OneToOne relations
|
||||
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -74,4 +74,4 @@ describe("github issues > #58 relations with multiple primary keys", () => {
|
||||
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -72,4 +72,4 @@ describe("github issues > #70 cascade deleting works incorrect", () => {
|
||||
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -51,4 +51,4 @@ describe("github issues > #71 ManyToOne relation with custom column name persist
|
||||
});
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -46,4 +46,4 @@ describe("github issues > #78 repository 'create' is skipping inherited fields",
|
||||
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -31,4 +31,4 @@ describe("github issues > #80 repository.persist fails when empty array is sent
|
||||
returnedPosts.should.be.equal(posts);
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -43,4 +43,4 @@ describe("insertion", function() {
|
||||
});
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -418,4 +418,4 @@ describe("one-to-one", function() {
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -487,4 +487,4 @@ describe("many-to-one", function() {
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -558,4 +558,4 @@ describe("many-to-many", function() {
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -44,4 +44,4 @@ describe("other issues > entity change in listeners should affect persistence",
|
||||
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -60,4 +60,4 @@ describe("other issues > joining empty relations", () => {
|
||||
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -60,4 +60,4 @@ describe("other issues > using limit in conjunction with order by", () => {
|
||||
|
||||
})));
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user