mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
Merge pull request #9 from DefinitelyTyped/master
Pull latest changes from head
This commit is contained in:
Vendored
+1
@@ -66,6 +66,7 @@ declare namespace Color {
|
||||
keyword(): string | undefined;
|
||||
hex(color: string): Color;
|
||||
hex(): string;
|
||||
rgb(): Color;
|
||||
rgbNumber(): number;
|
||||
luminosity(): number;
|
||||
contrast(color: Color): number;
|
||||
|
||||
@@ -23,6 +23,7 @@ function test_graph() {
|
||||
g.setDefaultEdgeLabel(() => 'e42');
|
||||
g.setNodes(['a', 'b', 'c'], 42);
|
||||
g.setParent('d', 'a');
|
||||
g.setParent('d');
|
||||
g.parent('d');
|
||||
g.children('a');
|
||||
g.filterNodes(v => true);
|
||||
|
||||
Vendored
+3
-2
@@ -65,7 +65,8 @@ declare module "graphlib" {
|
||||
setNodes(names: string[], label?: any): Graph;
|
||||
|
||||
/**
|
||||
* Sets node p as a parent for node v. Method throws an exception in case of
|
||||
* Sets node p as a parent for node v if it is defined, or removes the
|
||||
* parent for v if p is undefined. Method throws an exception in case of
|
||||
* invoking it in context of noncompound graph.
|
||||
* Average-case complexity: O(1).
|
||||
*
|
||||
@@ -73,7 +74,7 @@ declare module "graphlib" {
|
||||
* @argument p - node to be parent for v.
|
||||
* @returns the graph, allowing this to be chained with other functions.
|
||||
*/
|
||||
setParent(v: string, p: string): Graph;
|
||||
setParent(v: string, p?: string): Graph;
|
||||
|
||||
/**
|
||||
* Gets parent node for node v.
|
||||
|
||||
Vendored
+7
@@ -16,21 +16,28 @@ declare module "react-datepicker" {
|
||||
dateFormat?: string;
|
||||
dateFormatCalendar?: string;
|
||||
disabled?: boolean;
|
||||
dropdownMode?: string;
|
||||
endDate?: moment.Moment;
|
||||
excludeDates?: any[];
|
||||
filterDate?(): any;
|
||||
fixedHeight?: boolean;
|
||||
forceShowMonthNavigation?: boolean;
|
||||
highlightDates?: any[];
|
||||
id?: string;
|
||||
includeDates?: any[];
|
||||
inline?: boolean;
|
||||
isClearable?: boolean;
|
||||
locale?: string;
|
||||
maxDate?: moment.Moment;
|
||||
minDate?: moment.Moment;
|
||||
monthsShown?: number;
|
||||
name?: string;
|
||||
onBlur?(event: React.FocusEvent<HTMLInputElement>): void;
|
||||
onChange(date: moment.Moment | null, event: React.SyntheticEvent<any> | undefined): any;
|
||||
onChangeRaw?(event: React.FocusEvent<HTMLInputElement>): void;
|
||||
onFocus?(event: React.FocusEvent<HTMLInputElement>): void;
|
||||
onMonthChange?(date: moment.Moment): void;
|
||||
openToDate?: moment.Moment;
|
||||
peekNextMonth?: boolean;
|
||||
placeholderText?: string;
|
||||
popoverAttachment?: string;
|
||||
|
||||
@@ -8,8 +8,9 @@ import {
|
||||
Image,
|
||||
View,
|
||||
Dimensions,
|
||||
FlexJustifyType,
|
||||
FlexAlignType
|
||||
ViewStyle,
|
||||
TextStyle,
|
||||
ImageStyle,
|
||||
} from 'react-native';
|
||||
import SortableList, {RowProps} from 'react-native-sortable-list';
|
||||
|
||||
@@ -61,20 +62,20 @@ const data = {
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
flex: 1,
|
||||
justifyContent: "center" as FlexJustifyType,
|
||||
alignItems: "center" as FlexAlignType,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
backgroundColor: '#eee',
|
||||
paddingTop: 60,
|
||||
},
|
||||
} as ViewStyle,
|
||||
|
||||
list: {
|
||||
flex: 1,
|
||||
},
|
||||
} as ViewStyle,
|
||||
|
||||
contentContainer: {
|
||||
width: window.width,
|
||||
paddingHorizontal: 30,
|
||||
},
|
||||
} as ViewStyle,
|
||||
|
||||
row: {
|
||||
flexDirection: 'row',
|
||||
@@ -89,18 +90,18 @@ const styles = StyleSheet.create({
|
||||
shadowOpacity: 1,
|
||||
shadowOffset: {height: 2, width: 2},
|
||||
shadowRadius: 2,
|
||||
},
|
||||
} as ViewStyle,
|
||||
|
||||
image: {
|
||||
width: 60,
|
||||
height: 60,
|
||||
marginRight: 30,
|
||||
borderRadius: 30,
|
||||
},
|
||||
} as ImageStyle,
|
||||
|
||||
text: {
|
||||
fontSize: 24,
|
||||
},
|
||||
} as TextStyle,
|
||||
|
||||
});
|
||||
|
||||
|
||||
Vendored
+66
-15
@@ -1,6 +1,7 @@
|
||||
// Type definitions for react-native 0.42
|
||||
// Type definitions for react-native 0.43
|
||||
// Project: https://github.com/facebook/react-native
|
||||
// Definitions by: Eloy Durán <https://github.com/alloy>
|
||||
// Fedor Nezhivoi <https://github.com/gyzerok>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
@@ -531,9 +532,7 @@ export interface LayoutAnimationStatic {
|
||||
spring: (config: LayoutAnimationConfig, onAnimationDidEnd?: () => void) => void
|
||||
}
|
||||
|
||||
export type FlexAlignType = "flex-start" | "flex-end" | "center" | "stretch" | "baseline";
|
||||
export type FlexJustifyType = "flex-start" | "flex-end" | "center" | "space-between" | "space-around";
|
||||
export type FlexDirection = "row" | "column" | "row-reverse" | "column-reverse";
|
||||
type FlexAlignType = "flex-start" | "flex-end" | "center" | "stretch" | "baseline";
|
||||
|
||||
/**
|
||||
* Flex Prop Types
|
||||
@@ -541,9 +540,9 @@ export type FlexDirection = "row" | "column" | "row-reverse" | "column-reverse";
|
||||
* @see LayoutPropTypes.js
|
||||
*/
|
||||
export interface FlexStyle {
|
||||
|
||||
alignItems?: FlexAlignType;
|
||||
alignSelf?: "auto" | FlexAlignType;
|
||||
alignContent?: "flex-start" | "flex-end" | "center" | "stretch" | "space-between" | "space-around"
|
||||
alignItems?: FlexAlignType
|
||||
alignSelf?: "auto" | FlexAlignType
|
||||
borderBottomWidth?: number
|
||||
borderLeftWidth?: number
|
||||
borderRightWidth?: number
|
||||
@@ -551,18 +550,14 @@ export interface FlexStyle {
|
||||
borderWidth?: number
|
||||
bottom?: number | string
|
||||
flex?: number
|
||||
flexBasis?: number | string
|
||||
flexDirection?: "row" | "column" | "row-reverse" | "column-reverse"
|
||||
flexGrow?: number
|
||||
flexShrink?: number
|
||||
flexBasis?: number | string
|
||||
flexDirection?: FlexDirection
|
||||
flexWrap?: "wrap" | "nowrap"
|
||||
height?: number | string
|
||||
justifyContent?: FlexJustifyType
|
||||
justifyContent?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around"
|
||||
left?: number | string
|
||||
minWidth?: number | string
|
||||
maxWidth?: number | string
|
||||
minHeight?: number | string
|
||||
maxHeight?: number | string
|
||||
margin?: number | string
|
||||
marginBottom?: number | string
|
||||
marginHorizontal?: number | string
|
||||
@@ -570,6 +565,10 @@ export interface FlexStyle {
|
||||
marginRight?: number | string
|
||||
marginTop?: number | string
|
||||
marginVertical?: number | string
|
||||
maxHeight?: number | string
|
||||
maxWidth?: number | string
|
||||
minHeight?: number | string
|
||||
minWidth?: number | string
|
||||
overflow?: "visible" | "hidden" | "scroll"
|
||||
padding?: number | string
|
||||
paddingBottom?: number | string
|
||||
@@ -582,11 +581,12 @@ export interface FlexStyle {
|
||||
right?: number | string
|
||||
top?: number | string
|
||||
width?: number | string
|
||||
zIndex?: number
|
||||
|
||||
/**
|
||||
* @platform ios
|
||||
*/
|
||||
zIndex?: number
|
||||
direction?: 'inherit' | 'ltr' | 'rtl'
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -7156,6 +7156,57 @@ export interface UIManagerStatic {
|
||||
quality ?: number,
|
||||
}
|
||||
) => Promise<string>
|
||||
|
||||
/**
|
||||
* Determines the location on screen, width, and height of the given view and
|
||||
* returns the values via an async callback. If successful, the callback will
|
||||
* be called with the following arguments:
|
||||
*
|
||||
* - x
|
||||
* - y
|
||||
* - width
|
||||
* - height
|
||||
* - pageX
|
||||
* - pageY
|
||||
*
|
||||
* Note that these measurements are not available until after the rendering
|
||||
* has been completed in native. If you need the measurements as soon as
|
||||
* possible, consider using the [`onLayout`
|
||||
* prop](docs/view.html#onlayout) instead.
|
||||
*/
|
||||
measure(node: number, callback: MeasureOnSuccessCallback): void;
|
||||
|
||||
/**
|
||||
* Determines the location of the given view in the window and returns the
|
||||
* values via an async callback. If the React root view is embedded in
|
||||
* another native view, this will give you the absolute coordinates. If
|
||||
* successful, the callback will be called with the following
|
||||
* arguments:
|
||||
*
|
||||
* - x
|
||||
* - y
|
||||
* - width
|
||||
* - height
|
||||
*
|
||||
* Note that these measurements are not available until after the rendering
|
||||
* has been completed in native.
|
||||
*/
|
||||
measureInWindow(node: number, callback: MeasureInWindowOnSuccessCallback): void;
|
||||
|
||||
/**
|
||||
* Like [`measure()`](#measure), but measures the view relative an ancestor,
|
||||
* specified as `relativeToNativeNode`. This means that the returned x, y
|
||||
* are relative to the origin x, y of the ancestor view.
|
||||
*
|
||||
* As always, to obtain a native node handle for a component, you can use
|
||||
* `React.findNodeHandle(component)`.
|
||||
*/
|
||||
measureLayout(
|
||||
node: number,
|
||||
relativeToNativeNode: number,
|
||||
onFail: () => void, /* currently unused */
|
||||
onSuccess: MeasureLayoutOnSuccessCallback
|
||||
): void;
|
||||
}
|
||||
|
||||
export interface SwitchPropertiesIOS extends ViewProperties, React.Props<SwitchStatic> {
|
||||
|
||||
Reference in New Issue
Block a user