facebook / prop-types

Runtime type checking for React props and similar objects
MIT License
4.48k stars 356 forks source link

RequiredKeys always returns never #306

Closed Arlen22 closed 4 years ago

Arlen22 commented 4 years ago

Required keys should be

export type RequiredKeys<V> = { [K in keyof V]-?:
    Exclude<V[K], undefined> extends Requireable<infer T> ? never
    : Exclude<V[K], undefined> extends Validator<infer T> ? K
    : never }[keyof V];
ljharb commented 4 years ago

This is a TypeScript type. This repo does not contain any TS types; you'll want to file an issue in DefinitelyTyped instead.