augment-vir - v31.58.0
    Preparing search index...

    Type Alias ExtractKeysWithMatchingValues<Original, Matcher>

    ExtractKeysWithMatchingValues: keyof {
        [Key in keyof Original as IsNever<Extract<Original[Key], Matcher>> extends true
            ? never
            : Key]: Key
    }

    Performs keyof on all keys within the Original that have values matching the given Matcher.

    Type Parameters

    • Original
    • Matcher
    import {ExtractKeysWithMatchingValues} from '@augment-vir/common';

    type ExtractedKeys = ExtractKeysWithMatchingValues<{a: RegExp; b: string}, string>;
    // `ExtractedKeys` is `'b'`