web: fix typecheck

This commit is contained in:
Carl-Gerhard Lindesvärd
2023-10-26 21:15:08 +02:00
parent 8a87fff689
commit d8c587ef90
7 changed files with 33 additions and 29 deletions

View File

@@ -30,29 +30,32 @@ export type ProfileDecrementPayload = {
// Batching
export type BatchEvent = {
type: 'event',
type: 'event'
payload: EventPayload
}
export type BatchProfile = {
type: 'profile',
type: 'profile'
payload: ProfilePayload
}
export type BatchProfileIncrement = {
type: 'profile_increment',
type: 'profile_increment'
payload: ProfileIncrementPayload
}
export type BatchProfileDecrement = {
type: 'profile_decrement',
type: 'profile_decrement'
payload: ProfileDecrementPayload
}
export type BatchItem = BatchEvent | BatchProfile | BatchProfileIncrement | BatchProfileDecrement
export type BatchItem =
| BatchEvent
| BatchProfile
| BatchProfileIncrement
| BatchProfileDecrement
export type BatchPayload = Array<BatchItem>
export type MixanIssue = {
field: string
message: string
@@ -63,11 +66,11 @@ export type MixanErrorResponse = {
status: 'error'
code: number
message: string
issues?: Array<MixanIssue>
stack?: string
issues?: Array<MixanIssue> | undefined
stack?: string | undefined
}
export type MixanResponse<T> = {
result: T
status: 'ok'
}
}