Create an only ever true boolean type in typescript
![Photo by Cookie the Pom on Unsplash](/_next/image?url=%2Fimages%2Frandom-blog-covers%2Fcookie-the-pom-gySMaocSdqs-unsplash.jpg&w=1920&q=75)
Integrating with an API where a boolean can only be undefined or true I needed to type it. It's easy enough but I just wanted to jot it down in case any one else needs this in the future.
// create the required type
type OnlyEverTrue = true | undefined;
// and then to use it
{
property: OnlyEverTrue;
}