File tree Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Expand file tree Collapse file tree 2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change
1
+ import { InstanceSaveOptions } from 'sequelize' ;
2
+ import { IBuildOptions } from "./IBuildOptions" ;
3
+
4
+ /**
5
+ * Options for Model.create method
6
+ */
7
+ export interface ICreateOptions extends IBuildOptions , InstanceSaveOptions {
8
+
9
+ /**
10
+ * On Duplicate
11
+ */
12
+ onDuplicate ?: string ;
13
+ }
Original file line number Diff line number Diff line change @@ -14,18 +14,13 @@ import {
14
14
} from 'sequelize' ;
15
15
import { IAssociationActionOptions } from "../interfaces/IAssociationActionOptions" ;
16
16
import { IBuildOptions } from "../interfaces/IBuildOptions" ;
17
+ import { ICreateOptions } from "../interfaces/ICreateOptions" ;
17
18
18
19
/* tslint:disable:member-ordering */
19
20
/* tslint:disable:array-type */
20
21
/* tslint:disable:max-line-length */
21
22
/* tslint:disable:max-classes-per-file */
22
23
23
- // Webstorm cannot resolve "Partial" type automatically,
24
- // so we write our own one
25
- type _Partial < T > = {
26
- [ P in keyof T ] ?: T [ P ] ;
27
- } ;
28
-
29
24
/**
30
25
* Creates override for sequelize model to make the food
31
26
*/
@@ -306,8 +301,8 @@ export declare class Model<T> extends Hooks {
306
301
/**
307
302
* Builds a new model instance and calls save on it.
308
303
*/
309
- static create < T extends Model < T > > ( values ?: any , options ?: CreateOptions ) : Promise < T > ;
310
- static create < T extends Model < T > , A > ( values ?: A , options ?: CreateOptions ) : Promise < T > ;
304
+ static create < T extends Model < T > > ( values ?: any , options ?: ICreateOptions ) : Promise < T > ;
305
+ static create < T extends Model < T > , A > ( values ?: A , options ?: ICreateOptions ) : Promise < T > ;
311
306
312
307
/**
313
308
* Find a row that matches the query, or build (but don't save) the row if none is found.
You can’t perform that action at this time.
0 commit comments