-
-
Notifications
You must be signed in to change notification settings - Fork 23
refactor: refactor types #230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Pull Request Test Coverage Report for Build 7492170366
💛 - Coveralls |
| abstract _model: Model<T>; | ||
| _id!: string | number | undefined; | ||
| abstract _schema: Schema; | ||
| [key : string]: any; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how this can be modified to use the indexes in the generalized type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/types/array.ts
Outdated
| cast(value_: Exclude<unknown, null | undefined>, data?: unknown): I[]; | ||
| cast(value_?: unknown, data?: unknown): I[] | null | undefined; | ||
| cast(value_?: unknown, data?: unknown): I[] | null | undefined { | ||
| value_ = super.cast(value_, data); | ||
| if (value_ == null) return value_ as null | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO the type of SchemaType#cast should also be improved to avoid the as here.
|
Please submit a release PR if we need to release a new version after merge this PR. |
No description provided.