mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-28 00:32:17 +00:00
Set up flow config; add third party libdefs
This commit is contained in:
committed by
Nicolas Gallagher
parent
6b85f5a22a
commit
be3c78f317
@@ -0,0 +1,6 @@
|
||||
// flow-typed signature: 121e589c9be7dac408c14a02e88287fa
|
||||
// flow-typed version: a1a20d4928/create-react-class_v15.x.x/flow_>=v0.41.x
|
||||
|
||||
declare module 'create-react-class' {
|
||||
declare var exports: React$CreateClass;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Copyright (c) 2013-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.
|
||||
*/
|
||||
|
||||
declare module 'fbjs/lib/invariant' {
|
||||
declare function exports<T>(
|
||||
condition: any,
|
||||
message: string,
|
||||
...args: Array<any>
|
||||
): void;
|
||||
}
|
||||
|
||||
declare module 'fbjs/lib/nullthrows' {
|
||||
declare function exports<T>(value: ?T): T;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
// flow-typed signature: 3eaa1f24c7397b78a7481992d2cddcb2
|
||||
// flow-typed version: a1a20d4928/prop-types_v15.x.x/flow_>=v0.41.x
|
||||
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user