Skip to content

Commit

Permalink
fix(types): add derived types for priority and cache
Browse files Browse the repository at this point in the history
  • Loading branch information
krisztiaan-uic authored and Krisztiaan committed Apr 30, 2020
1 parent cde7af5 commit 3e79000
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ const resizeMode = {
center: 'center',
} as const

type Priority = 'low' | 'normal' | 'high'
type Priority = typeof priority[keyof typeof priority]

const priority = {
low: 'low',
normal: 'normal',
high: 'high',
} as const

type Cache = 'low' | 'normal' | 'high'
type Cache = typeof cacheControl[keyof typeof cacheControl]

const cacheControl = {
// Ignore headers, use uri as cache key, fetch only if not in cache.
Expand Down

0 comments on commit 3e79000

Please sign in to comment.