Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumTypeScriptgeneric defaultsSingle-choice MCQ

What is the type of `loader.out` here, given the default uses a conditional type over an earlier parameter?

type Unwrap<T> = T extends Promise<infer U> ? U : T; class Loader<TRaw, TOut = Unwrap<TRaw>> { out!: TOut; } const loader = new Loader<Promise<string>>(/* ... */);