Skip to content

Commit ab0c6a0

Browse files
author
Andrew Schmadel
committed
update docs
1 parent b8e2e41 commit ab0c6a0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,10 @@ export class User extends Model<User> {}
221221
### Build and create
222222
Instantiation and inserts can be achieved in the good old sequelize way
223223
```typescript
224-
const person = Person.build<Person>({name: 'bob', age: 99});
224+
const person = Person.build({name: 'bob', age: 99});
225225
person.save();
226226

227-
Person.create<Person>({name: 'bob', age: 99});
227+
Person.create({name: 'bob', age: 99});
228228
```
229229
but *sequelize-typescript* also makes it possible to create instances with `new`:
230230
```typescript
@@ -237,15 +237,15 @@ Finding and updating entries does also work like using native sequelize. So see
237237
[docs](http://docs.sequelizejs.com/manual/tutorial/models-usage.html) for more details.
238238
```typescript
239239
Person
240-
.findOne<Person>()
240+
.findOne()
241241
.then(person => {
242242

243243
person.age = 100;
244244
return person.save();
245245
});
246246

247247
Person
248-
.update<Person>({
248+
.update({
249249
name: 'bobby'
250250
}, {where: {id: 1}})
251251
.then(() => {
@@ -290,7 +290,7 @@ That's all, *sequelize-typescript* does everything else for you. So when retriev
290290
```typescript
291291

292292
Team
293-
.findOne<Team>({include: [Player]})
293+
.findOne({include: [Player]})
294294
.then(team => {
295295

296296
team.players.forEach(player => console.log(`Player ${player.name}`));

0 commit comments

Comments
 (0)