TypeScript · Advanced Types · Mid-Level · Concept
const type parameters?
Short Interview Answer
generic const T preserves literal types from arguments.
Detailed Explanation
Helps APIs that want narrow inference from object/array literals.
TypeScript · Advanced Types · Mid-Level · Concept
generic const T preserves literal types from arguments.
Helps APIs that want narrow inference from object/array literals.
Did you know this answer?