fixup! address code review comments
This commit is contained in:
parent
548379ca2a
commit
6f3675b13c
|
@ -18,7 +18,7 @@ export type Options = AnyObject<any>;
|
|||
/**
|
||||
* Type alias for Node.js callback functions
|
||||
*/
|
||||
export type Callback<T = any> = (err?: Error | null, result?: T) => void;
|
||||
export type Callback<T = any> = (err?: any | null, result?: T) => void;
|
||||
|
||||
/**
|
||||
* Return export type for promisified Node.js async methods.
|
||||
|
|
|
@ -242,8 +242,14 @@ export declare class ModelBuilder extends EventEmitter {
|
|||
): ModelBaseClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* An extension of the built-in Partial<T> type which allows partial values
|
||||
* in deeply nested properties too.
|
||||
*/
|
||||
export type DeepPartial<T> = { [P in keyof T]?: DeepPartial<T[P]>; };
|
||||
|
||||
/**
|
||||
* Union export type for model instance or plain object representing the model
|
||||
* instance
|
||||
*/
|
||||
export type ModelData<T extends ModelBase = ModelBase> = T | Partial<T>;
|
||||
export type ModelData<T extends ModelBase = ModelBase> = T | DeepPartial<T>;
|
||||
|
|
Loading…
Reference in New Issue