Type Alias ExcludeKeysWithMatchingValues<OriginalObject, Matcher>

ExcludeKeysWithMatchingValues<OriginalObject, Matcher>: keyof {
    [Prop in keyof OriginalObject as OriginalObject[Prop] extends Matcher
        ? never
        : Prop]: Prop
}

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

Type Parameters

  • OriginalObject extends object
  • Matcher
import {ExcludeKeysWithMatchingValues} from '@augment-vir/common';

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