Adding prop-types package and disabling auto-mock for Jest

Reviewed By: spicyj

Differential Revision: D4874587

fbshipit-source-id: 5c4c3d96a003d271fd5755191681ea7f729db235
This commit is contained in:
Brian Vaughn 2017-04-12 09:53:48 -07:00 committed by Facebook Github Bot
parent abcd1b6370
commit 00330987c8
2 changed files with 47 additions and 0 deletions

46
flow/prop-types.js Normal file
View File

@ -0,0 +1,46 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @flow
* @nolint
*/
// TODO (bvaughn) Remove this file once flowtype/flow-typed/pull/773 is merged
type $npm$propTypes$ReactPropsCheckType = (
props: any,
propName: string,
componentName: string,
href?: string
) => ?Error;
declare module 'prop-types' {
declare var array: React$PropType$Primitive<Array<any>>;
declare var bool: React$PropType$Primitive<boolean>;
declare var func: React$PropType$Primitive<Function>;
declare var number: React$PropType$Primitive<number>;
declare var object: React$PropType$Primitive<Object>;
declare var string: React$PropType$Primitive<string>;
declare var any: React$PropType$Primitive<any>;
declare var arrayOf: React$PropType$ArrayOf;
declare var element: React$PropType$Primitive<any>; /* TODO */
declare var instanceOf: React$PropType$InstanceOf;
declare var node: React$PropType$Primitive<any>; /* TODO */
declare var objectOf: React$PropType$ObjectOf;
declare var oneOf: React$PropType$OneOf;
declare var oneOfType: React$PropType$OneOfType;
declare var shape: React$PropType$Shape;
declare function checkPropTypes<V>(
propTypes: $Subtype<{[_: $Keys<V>]: $npm$propTypes$ReactPropsCheckType}>,
values: V,
location: string,
componentName: string,
getStack: ?(() => ?string)
) : void;
}

View File

@ -187,6 +187,7 @@
"plist": "^1.2.0",
"pretty-format": "^4.2.1",
"promise": "^7.1.1",
"prop-types": "^15.5.7",
"react-clone-referenced-element": "^1.0.1",
"react-devtools-core": "^2.0.8",
"react-timer-mixin": "^0.13.2",