Skip to content

Commit 2567c1a

Browse files
style: format code with Prettier
1 parent 5f4eccc commit 2567c1a

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Container } from 'typedi';
22
import { ConnectionManager } from 'typeorm';
33

4-
/**
4+
/**
55
* We need to set imported TypeORM classes before requesting them, otherwise we
66
* would receive a "ServiceNotFoundError" above TypeDI 0.9.1.
77
*/

test/src/app.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import { ok, deepStrictEqual } from 'assert';
22
import { Container } from 'typedi';
3-
import { createConnection, } from 'typeorm';
3+
import { createConnection } from 'typeorm';
44
import { UserRepository } from './user.respository';
55
import { User } from './user.entity';
66

77
export async function startApp() {
8-
const connection = await createConnection({
8+
const connection = await createConnection({
99
/** we use in memoty SQL JS to test the lib. */
10-
type: 'sqljs',
10+
type: 'sqljs',
1111
logger: 'advanced-console',
1212
logging: true,
1313
/** We don't want to mess with the creation of table now, so we auto-create it. */
1414
synchronize: true,
1515
/** Entities must be registered in TypeORM before you can use them. */
16-
entities: [User],
16+
entities: [User],
1717
});
1818

1919
const userOne = new User();
@@ -43,4 +43,4 @@ export async function startApp() {
4343

4444
/** Close the connection so the app can exit. */
4545
await connection.close();
46-
}
46+
}

test/src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'reflect-metadata';
22
import { Container } from 'typedi';
33
import { useContainer } from 'typeorm';
4-
import { startApp } from './app'
4+
import { startApp } from './app';
55

66
useContainer(Container);
77

@@ -12,4 +12,4 @@ startApp()
1212
console.error(error);
1313
/** We exit with error code so tests will fail. */
1414
process.exit(-1);
15-
});
15+
});

test/src/user.respository.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@ import { EntityManager, Repository } from 'typeorm';
22
import { Service } from 'typedi';
33

44
/**
5-
* It's important that we import these from the index.ts file, because the
6-
* entry point file runs some setup logic for the default container.
5+
* It's important that we import these from the index.ts file, because the
6+
* entry point file runs some setup logic for the default container.
77
*/
88
import { InjectRepository, InjectManager } from '../../src';
99
import { User } from './user.entity';
1010

1111
@Service()
1212
export class UserRepository {
13-
1413
@InjectManager()
1514
private entityManager!: EntityManager;
1615

0 commit comments

Comments
 (0)