'How can I make a typescript generic less specific?
When typescript captures generics it captures them very specifically which can lead to complications.
How can I make this "LessSpecific" type dynamically return the less specific type of the provided argument?
const value: LessSpecific<'I am a string literal!'>
// Expected type of value: string
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
