[@types/prop-types] Add support of as const to oneOf (#34706)

* Add readonly modifier to oneOf definition

* remove unnecessary periods, trigger ci build
This commit is contained in:
Igor Bezkrovnyi
2019-04-17 13:58:49 -07:00
committed by Nathan Shively-Sanders
parent 267a9080a8
commit 3ea656446c
+3 -3
View File
@@ -65,7 +65,7 @@ export const element: Requireable<ReactElementLike>;
export const symbol: Requireable<symbol>;
export const elementType: Requireable<ReactComponentLike>;
export function instanceOf<T>(expectedClass: new (...args: any[]) => T): Requireable<T>;
export function oneOf<T>(types: T[]): Requireable<T>;
export function oneOf<T>(types: ReadonlyArray<T>): Requireable<T>;
export function oneOfType<T extends Validator<any>>(types: T[]): Requireable<NonNullable<InferType<T>>>;
export function arrayOf<T>(type: Validator<T>): Requireable<T[]>;
export function objectOf<T>(type: Validator<T>): Requireable<{ [K in keyof any]: T; }>;
@@ -79,8 +79,8 @@ export function exact<P extends ValidationMap<any>>(type: P): Requireable<Requir
* @param typeSpecs Map of name to a ReactPropType
* @param values Runtime values that need to be type-checked
* @param location e.g. "prop", "context", "child context"
* @param componentName Name of the component for error messages.
* @param getStack Returns the component stack.
* @param componentName Name of the component for error messages
* @param getStack Returns the component stack
*/
export function checkPropTypes(typeSpecs: any, values: any, location: string, componentName: string, getStack?: () => any): void;