Skip to content

Commit

Permalink
use Optional helper to align with sequelize TS guide
Browse files Browse the repository at this point in the history
  • Loading branch information
lukashroch committed Dec 27, 2020
1 parent fda11c8 commit 8e9df92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ class Person extends Model {}


```typescript
import { Optional } from 'sequelize';
import { Table, Model } from 'sequelize-typescript';

interface PersonAttributes {
id: number;
name: string;
}

interface PersonCreationAttributes {
name: string;
interface PersonCreationAttributes extends Optional<PersonAttributes, 'id'> {
}

@Table
Expand Down

0 comments on commit 8e9df92

Please sign in to comment.