QuizNot attempted
Utility types
1–4 to choose, Enter to submit
Show answer & explanation
Correct answer:
Awaited<ReturnType<typeof getUser>>
ReturnType<typeof getUser>is `Promise<{ id: number- name: string }>
, andAwaited<>` unwraps the promise (recursively) to the resolved value. - Not ReturnType alone: still wrapped in
Promise. - Not Parameters: gives the arguments tuple (
[]here). - Not InstanceType: only works on constructor types.