I have a tuple which contains couple of objects.
const repos = [
{ name: 'react', type: 'JS' },
{ name: 'angular', type: 'TS' },
] as const
const RepoTypes = typeof repos
const jsRepoTypes = FilterRepos<'JS'> // Should return the type object containing only JS
I am looking for some generic Utility Type ( FilterRepos<T> ) where I can pass the type parameter and it should return me the filtered tuple type.