-
Notifications
You must be signed in to change notification settings - Fork 246
chore(user-data): remove redundant withStats methods #7134
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
| }); | ||
| } | ||
|
|
||
| private mergeStats(pipeline: SavedPipeline, stats: Stats): SavedPipeline { |
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.
That was the only case where we use it, and even then we always write our own number on create / update
| .number() | ||
| .transform((x) => new Date(x)) | ||
| .optional(), | ||
| .default(0) |
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.
In the rarest case ever if someone still somehow doesn't have this value stored, we fallback to zero, the logic for writing this value to UserData was here for such a long time, I don't think this will ever be used
|
|
||
| export interface ReadAllResult<T extends z.Schema> { | ||
| data: z.output<T>[]; | ||
| errors: Error[]; |
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.
This shape with returned errors is also not used anywhere really, we always pick up data, but it's a bigger change and this part of the interface doesn't depend on fs, so not touching it
These are not meaningfully used in Compass and make it harder to have the same interface shared between web and desktop