mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 07:17:04 +00:00
[@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:
committed by
Nathan Shively-Sanders
parent
267a9080a8
commit
3ea656446c
Vendored
+3
-3
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user