Skip to content

Commit

Permalink
chore: flow types
Browse files Browse the repository at this point in the history
  • Loading branch information
msand committed Apr 9, 2020
1 parent 88953c3 commit 276febe
Showing 1 changed file with 30 additions and 7 deletions.
37 changes: 30 additions & 7 deletions src/index.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,14 @@ export type CircleProps = {
...
} & CommonPathProps;
declare export var Circle: React.ComponentClass<CircleProps>;
export type Circle = React.ComponentClass<CircleProps>;
export interface ClipPathProps {
id?: string;
}
declare export var ClipPath: React.ComponentClass<ClipPathProps>;
export type ClipPath = React.ComponentClass<ClipPathProps>;
declare export var Defs: React.ComponentClass<{ ... }>;
export type Defs = React.ComponentClass<{ ... }>;
export type EllipseProps = {
cx?: NumberProp,
cy?: NumberProp,
Expand All @@ -215,18 +218,21 @@ export type EllipseProps = {
...
} & CommonPathProps;
declare export var Ellipse: React.ComponentClass<EllipseProps>;
export type Ellipse = React.ComponentClass<EllipseProps>;
export type GProps = {
opacity?: NumberProp,
...
} & CommonPathProps;
declare export var G: React.ComponentClass<GProps>;
export type G = React.ComponentClass<GProps>;
export interface ForeignObjectProps {
x?: NumberProp;
y?: NumberProp;
width?: NumberProp;
height?: NumberProp;
}
declare export var ForeignObject: React.ComponentClass<ForeignObjectProps>;
export type ForeignObject = React.ComponentClass<ForeignObjectProps>;
export type ImageProps = {
x?: NumberProp,
y?: NumberProp,
Expand All @@ -244,6 +250,7 @@ export type ImageProps = {
ClipProps &
TouchableProps;
declare export var Image: React.ComponentClass<ImageProps>;
export type Image = React.ComponentClass<ImageProps>;
export type LineProps = {
opacity?: NumberProp,
x1?: NumberProp,
Expand All @@ -253,6 +260,7 @@ export type LineProps = {
...
} & CommonPathProps;
declare export var Line: React.ComponentClass<LineProps>;
export type Line = React.ComponentClass<LineProps>;
export interface LinearGradientProps {
x1?: NumberProp;
x2?: NumberProp;
Expand All @@ -263,12 +271,14 @@ export interface LinearGradientProps {
id?: string;
}
declare export var LinearGradient: React.ComponentClass<LinearGradientProps>;
export type LinearGradient = React.ComponentClass<LinearGradientProps>;
export type PathProps = {
d?: string,
opacity?: NumberProp,
...
} & CommonPathProps;
declare export var Path: React.ComponentClass<PathProps>;
export type Path = React.ComponentClass<PathProps>;
export interface PatternProps {
id?: string;
x?: NumberProp;
Expand All @@ -282,18 +292,21 @@ export interface PatternProps {
preserveAspectRatio?: string;
}
declare export var Pattern: React.ComponentClass<PatternProps>;
export type Pattern = React.ComponentClass<PatternProps>;
export type PolygonProps = {
opacity?: NumberProp,
points?: string | $ReadOnlyArray<NumberProp>,
...
} & CommonPathProps;
declare export var Polygon: React.ComponentClass<PolygonProps>;
export type Polygon = React.ComponentClass<PolygonProps>;
export type PolylineProps = {
opacity?: NumberProp,
points?: string | $ReadOnlyArray<NumberProp>,
...
} & CommonPathProps;
declare export var Polyline: React.ComponentClass<PolylineProps>;
export type Polyline = React.ComponentClass<PolylineProps>;
export interface RadialGradientProps {
fx?: NumberProp;
fy?: NumberProp;
Expand All @@ -307,6 +320,7 @@ export interface RadialGradientProps {
id?: string;
}
declare export var RadialGradient: React.ComponentClass<RadialGradientProps>;
export type RadialGradient = React.ComponentClass<RadialGradientProps>;
export type RectProps = {
x?: NumberProp,
y?: NumberProp,
Expand All @@ -318,12 +332,14 @@ export type RectProps = {
...
} & CommonPathProps;
declare export var Rect: React.ComponentClass<RectProps>;
export type Rect = React.ComponentClass<RectProps>;
export interface StopProps {
stopColor?: Color;
stopOpacity?: NumberProp;
offset?: NumberProp;
}
declare export var Stop: React.ComponentClass<StopProps>;
export type Stop = React.ComponentClass<StopProps>;
export type SvgProps = {
width?: NumberProp,
height?: NumberProp,
Expand All @@ -335,6 +351,7 @@ export type SvgProps = {
} & GProps &
ReactNative.ViewProperties;
declare export var Svg: React.ComponentClass<SvgProps>;
export type Svg = React.ComponentClass<SvgProps>;
declare export default typeof Svg;
export interface SymbolProps {
id?: string;
Expand All @@ -343,6 +360,7 @@ export interface SymbolProps {
opacity?: NumberProp;
}
declare export var Symbol: React.ComponentClass<SymbolProps>;
export type Symbol = React.ComponentClass<SymbolProps>;
export type TSpanProps = {
x?: NumberArray,
y?: NumberArray,
Expand All @@ -354,6 +372,7 @@ export type TSpanProps = {
} & CommonPathProps &
FontProps;
declare export var TSpan: React.ComponentClass<TSpanProps>;
export type TSpan = React.ComponentClass<TSpanProps>;
export type TextSpecificProps = {
alignmentBaseline?: AlignmentBaseline,
baselineShift?: BaselineShift,
Expand All @@ -379,6 +398,7 @@ export type TextProps = {
...
} & TextSpecificProps;
declare export var Text: React.ComponentClass<TextProps>;
export type Text = React.ComponentClass<TextProps>;
export type TextPathProps = {
xlinkHref?: string,
href?: string,
Expand All @@ -389,6 +409,7 @@ export type TextPathProps = {
...
} & TextSpecificProps;
declare export var TextPath: React.ComponentClass<TextPathProps>;
export type TextPath = React.ComponentClass<TextPathProps>;
export type UseProps = {
xlinkHref?: string,
href?: string,
Expand All @@ -400,6 +421,7 @@ export type UseProps = {
...
} & CommonPathProps;
declare export var Use: React.ComponentClass<UseProps>;
export type Use = React.ComponentClass<UseProps>;
declare export var EMaskUnits: {|
+USER_SPACE_ON_USE: "userSpaceOnUse", // "userSpaceOnUse"
+OBJECT_BOUNDING_BOX: "objectBoundingBox" // "objectBoundingBox"
Expand All @@ -419,6 +441,7 @@ export type MaskProps = {
...
} & CommonPathProps;
declare export var Mask: React.ComponentClass<MaskProps>;
export type Mask = React.ComponentClass<MaskProps>;
declare export var MarkerUnits: {|
+STROKE_WIDTH: "strokeWidth", // "strokeWidth"
+USER_SPACE_ON_USE: "userSpaceOnUse" // "userSpaceOnUse"
Expand All @@ -440,6 +463,7 @@ export interface MarkerProps {
orient?: $Values<typeof Orient> | NumberProp;
}
declare export var Marker: React.ComponentClass<MarkerProps>;
export type Marker = React.ComponentClass<MarkerProps>;
export type Styles = {
[property: string]: string,
...
Expand All @@ -466,30 +490,29 @@ export type JsxAST = {
children: (React$Node | string)[],
...
} & AST;
export type AdditionalProps = {
onError?: (error: Error) => void,
override?: SvgProps,
} & SvgProps;
export type UriProps = {
uri: string | null,
override?: SvgProps,
...
} & AdditionalProps;
} & SvgProps;
export type UriState = {
xml: string | null,
...
};
export type XmlProps = {
xml: string | null,
override?: SvgProps,
...
} & AdditionalProps;
} & SvgProps;
export type XmlState = {
ast: JsxAST | null,
...
};
export type AstProps = {
ast: JsxAST | null,
override?: SvgProps,
...
} & AdditionalProps;
} & SvgProps;
export type Middleware = (ast: XmlAST) => XmlAST;
declare export function parse(
source: string,
Expand Down

0 comments on commit 276febe

Please sign in to comment.