mirror of
https://github.com/cupcakearmy/mikro-orm-arp.git
synced 2024-12-21 23:56:30 +00:00
prettier
This commit is contained in:
parent
b35309370b
commit
5a0c42e1f0
8
.prettierrc
Normal file
8
.prettierrc
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"printWidth": 250,
|
||||
"singleQuote": true,
|
||||
"semi": false,
|
||||
"trailingComma": "es5"
|
||||
}
|
@ -53,6 +53,9 @@ export abstract class BaseEntity {
|
||||
static persist<T extends BaseEntity>(this: ObjectType<T>, ...args: Parameters<EntityRepository<T>['persist']>): ReturnType<EntityRepository<T>['persist']> {
|
||||
return (this as any).getRepo().persist(...args)
|
||||
}
|
||||
static persistAndFlush<T extends BaseEntity>(this: ObjectType<T>, ...args: Parameters<EntityRepository<T>['persistAndFlush']>): ReturnType<EntityRepository<T>['persistAndFlush']> {
|
||||
return (this as any).getRepo().persist(...args)
|
||||
}
|
||||
static populate<T extends BaseEntity>(this: ObjectType<T>, ...args: Parameters<EntityRepository<T>['populate']>): ReturnType<EntityRepository<T>['populate']> {
|
||||
return (this as any).getRepo().populate(...args)
|
||||
}
|
||||
@ -61,4 +64,4 @@ export abstract class BaseEntity {
|
||||
}
|
||||
}
|
||||
|
||||
export const register = <D extends IDatabaseDriver = IDatabaseDriver>(db: MikroORM<D>) => (orm = db)
|
||||
export const register = <D extends IDatabaseDriver = IDatabaseDriver<Connection>>(db: MikroORM<D>) => (orm = db)
|
||||
|
Loading…
Reference in New Issue
Block a user