Skip to content

Commit

Permalink
fix(url-state): fix type check
Browse files Browse the repository at this point in the history
  • Loading branch information
baurine committed Jul 8, 2024
1 parent a639781 commit c4538fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/playground/src/hooks/use-url-state.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ export function UrlStateProvider(props: {

//----------------------

type UrlState = Record<string, string | undefined>
type UrlStateObj<T extends UrlState = UrlState> = Partial<{
type UrlState = Partial<Record<string, string>>
type UrlStateObj<T extends UrlState = UrlState> = {
[key in keyof T]: string
}>
}

export function useUrlState<T extends UrlState = UrlState>(): [
UrlStateObj<T>,
Expand Down

0 comments on commit c4538fd

Please sign in to comment.