We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dear All,
I'm not even sure if it is possible, but a lot of times we convert Props to Array. Use case: imagine a "Cached Model":
export class CachedModel { id: CacheIdentifier<number>; locale: CacheIdentifier<string>; noIdentifier: string; }
I can already extract the keys: type ExtractCacheIdentifierKeys<Model extends CachedModel> = ConditionalKeys<Model, CacheIdentifier<string | number>>;
type ExtractCacheIdentifierKeys<Model extends CachedModel> = ConditionalKeys<Model, CacheIdentifier<string | number>>;
But what if I need to construct an array of all the keys? Like
const cacheIdentifiersToUse:Array<ExtractCacheIdentifierKeys<CachedModel>> = ["id","id"]
How would it be possible to make sure that each key of ExtractedKeys does only exist once in the array?
The text was updated successfully, but these errors were encountered:
Sounds like you should be using a Set.
Set
Sorry, something went wrong.
Oh what a shame… absolutely correct… I‘ll better leave now 😂
No branches or pull requests
Dear All,
I'm not even sure if it is possible, but a lot of times we convert Props to Array. Use case: imagine a "Cached Model":
I can already extract the keys:
type ExtractCacheIdentifierKeys<Model extends CachedModel> = ConditionalKeys<Model, CacheIdentifier<string | number>>;
But what if I need to construct an array of all the keys? Like
How would it be possible to make sure that each key of ExtractedKeys does only exist once in the array?
The text was updated successfully, but these errors were encountered: