Skip to content

Commit 8e9df92

Browse files
committed
use Optional helper to align with sequelize TS guide
1 parent fda11c8 commit 8e9df92

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,15 @@ class Person extends Model {}
113113

114114

115115
```typescript
116+
import { Optional } from 'sequelize';
116117
import { Table, Model } from 'sequelize-typescript';
117118

118119
interface PersonAttributes {
119120
id: number;
120121
name: string;
121122
}
122123

123-
interface PersonCreationAttributes {
124-
name: string;
124+
interface PersonCreationAttributes extends Optional<PersonAttributes, 'id'> {
125125
}
126126

127127
@Table

0 commit comments

Comments
 (0)