Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardTypeScriptNoInfer and const type paramsSingle-choice MCQ

What is the purpose of `NoInfer<T>` in the signature below, and at which point in inference does it take effect?

function createList<T>(items: T[], initial: NoInfer<T>): T[] { return items } const r = createList([1, 2, 3], 0);