Skip to content
Snippets Groups Projects
Commit 495c46e7 authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

refactor: extract KeysFrom<T> utility type

parent e585c3ce
No related branches found
No related tags found
No related merge requests found
......@@ -11,9 +11,7 @@ import { defineStore } from 'pinia'
import { createSteeringURL } from '@/api'
import { components } from '@/steering-types'
import { steeringAuthInit } from '@/stores/auth'
import { Show } from '@/types'
type KeysFrom<T, K extends keyof T> = K
import { KeysFrom, Show } from '@/types'
type ReadonlyAttrs = KeysFrom<Show, 'id' | 'createdAt' | 'createdBy' | 'updatedAt' | 'updatedBy'>
type ShowCreateData = Omit<Show, ReadonlyAttrs>
......
......@@ -16,6 +16,8 @@ export type PaginationData = {
itemRange: [number, number]
}
export type KeysFrom<T, K extends keyof T> = K
export type TimeSlot = Required<steeringComponents['schemas']['TimeSlot']>
export type Show = Required<steeringComponents['schemas']['Show']>
export type Playlist = Required<tankComponents['schemas']['store.Playlist']>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment