T1 = HasKey<{ foo: string, bar: string }, 'foo'> // true type T2 = HasKey<{ foo: string, bar: string }, 'foo' | 'hoge'> // false // IsNever<Exclude<'foo' | 'hoge', 'foo' | 'bar'>> // IsNever<'hoge'> // false https://github.com/react-hook-form/react-hook-form/blob/v7.51.5/src/types/path/common.ts#L376