Skip to content

Commit

Permalink
feat: correctly type FormFeedbackDto
Browse files Browse the repository at this point in the history
  • Loading branch information
karrui committed Jul 14, 2021
1 parent 493c25b commit b12b813
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions shared/types/form/form_feedback.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Merge } from 'type-fest'
import { DateString } from '../generic'
import { FormDto } from './form'

Expand All @@ -14,10 +15,15 @@ export type FormFeedbackBase = {
rating: number
comment?: string
formId: FormDto['_id']
created?: DateString
lastModified?: DateString
created?: Date
lastModified?: Date
}
export type FormFeedbackDto = FormFeedbackBase

// Convert to serialized version.
export type FormFeedbackDto = Merge<
FormFeedbackBase,
{ created?: DateString; lastModified?: DateString }
>

export type ProcessedFeedbackMeta = {
index: number
Expand Down

0 comments on commit b12b813

Please sign in to comment.