Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumTypeScriptconditional typesSingle-choice MCQ

Given this hand-rolled `IsUnknown`, what are `A` and `B`?

type IsUnknown<T> = unknown extends T ? ([T] extends [null | undefined] ? false : true) : false; type A = IsUnknown<unknown>; type B = IsUnknown<string>;