Skip to content
RED SAG Skills
mediumStudy question · answer published in TypeScript interview questions, so no pointsjavascripttypescriptnarrowing

Narrowing with the in operator

type Admin = { permissions: string[] } and type Guest = { expiresAt: Date }. In if ("permissions" in user) { ... }, what is user narrowed to?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions