🌐 AI搜索 & 代理 主页
Skip to content

Commit 351b809

Browse files
authored
fix(core): Further improve type declaration for model validation functions (#17686)
1 parent e594d29 commit 351b809

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/core/src/model.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2115,7 +2115,9 @@ export interface ModelOptions<M extends Model = Model> {
21152115
/**
21162116
* Custom validation functions run on all instances of the model.
21172117
*/
2118-
[name: string]: ((this: M) => void) | ((this: M, callback: (err: unknown) => void) => void);
2118+
[name: string]:
2119+
| ((this: CreationAttributes<M>) => void)
2120+
| ((this: CreationAttributes<M>, callback: (err: unknown) => void) => void);
21192121
}
21202122
| undefined;
21212123

0 commit comments

Comments
 (0)