Skip to content

Commit 2a650f1

Browse files
style: format code with Prettier
1 parent ffc9cca commit 2a650f1

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,12 @@ import { Container } from 'typedi';
4040
useContainer(Container);
4141

4242
/** Create a connection and start using TypeORM. */
43-
createConnection({ /* <connection options> */})
44-
.catch(error => {
45-
console.error(`Couldn't connect to the database!`);
46-
console.error(error);
47-
});
43+
createConnection({
44+
/* <connection options> */
45+
}).catch(error => {
46+
console.error(`Couldn't connect to the database!`);
47+
console.error(error);
48+
});
4849
```
4950

5051
## Usage
@@ -66,7 +67,6 @@ import { InjectConnection } from 'typeorm-typedi-extensions';
6667

6768
@Service()
6869
export class MyCustomClass {
69-
7070
@InjectConnection()
7171
private propertyInjectedConnection: Connection;
7272

@@ -86,7 +86,6 @@ import { InjectManager } from 'typeorm-typedi-extensions';
8686

8787
@Service()
8888
export class MyCustomClass {
89-
9089
@InjectManager()
9190
private propertyInjectedEntityManager: EntityManager;
9291

@@ -108,15 +107,14 @@ import { MyDatabaseModel } from './entities/post.entity.ts';
108107

109108
@Service()
110109
export class MyCustomClass {
111-
112110
@InjectRepository(MyDatabaseModel)
113111
private propertyInjectedRepository: Repository<MyDatabaseModel>;
114112

115113
constructor(@InjectRepository(MyDatabaseModel) private constructorInjectedRepository: Repository<MyDatabaseModel>) {}
116114
}
117115
```
118116

119-
Example with custom connection name:
117+
Example with custom connection name:
120118

121119
```ts
122120
@Service()
@@ -159,4 +157,4 @@ export class PostService {
159157
}
160158
```
161159

162-
[typedi]: https://github.com/typestack/typedi
160+
[typedi]: https://github.com/typestack/typedi

0 commit comments

Comments
 (0)