Skip to content

Instantly share code, notes, and snippets.

@guz-anton
Last active February 15, 2024 11:15
Show Gist options
  • Save guz-anton/12cebf5a5f401ad4bd4a3655dda01718 to your computer and use it in GitHub Desktop.
Save guz-anton/12cebf5a5f401ad4bd4a3655dda01718 to your computer and use it in GitHub Desktop.
smaple

type AA = Partial<Record<'next' | 'back' | 'hideOthers', string>> type BB = Record<'next' | 'back' | 'hideOthers', string>

const aa: AA = { next: 'adads' }

type FN = (a: Record<string, string>) => void

const fx: FN = (bb) => console.log(bb)

fx(aa) // ^?

let qq = new URLSearchParams(aa)


type AA = Partial<Record<'next' | 'back' | 'hideOthers', string>>
type BB = Record<'next' | 'back' | 'hideOthers', string>

const aa: AA = {
  next: 'adads'
}

type FN = (a: Record<string, string>) => void

const fx: FN = (bb) => console.log(bb)

fx(aa)
// ^?

let qq = new URLSearchParams(aa)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment