diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..7811e18 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,63 @@ +declare module '@react-native-community/art' { + import {ViewStyle, StyleProp} from 'react-native'; + import React from 'react'; + + export interface ARTNodeMixin { + opacity?: number; + originX?: number; + originY?: number; + scaleX?: number; + scaleY?: number; + scale?: number; + title?: string; + x?: number; + y?: number; + visible?: boolean; + } + + export interface ARTGroupProps extends ARTNodeMixin { + width?: number; + height?: number; + } + + export interface ARTClippingRectangleProps extends ARTNodeMixin { + width?: number; + height?: number; + } + + export interface ARTRenderableMixin extends ARTNodeMixin { + fill?: string; + stroke?: string; + strokeCap?: 'butt' | 'square' | 'round'; + strokeDash?: number[]; + strokeJoin?: 'bevel' | 'miter' | 'round'; + strokeWidth?: number; + } + + export interface ARTShapeProps extends ARTRenderableMixin { + d: string; + width?: number; + height?: number; + } + + export interface ARTTextProps extends ARTRenderableMixin { + font?: string; + alignment?: string; + } + + export interface ARTSurfaceProps { + style?: StyleProp; + width: number; + height: number; + } + + export class ClippingRectangle extends React.Component {} + + export class Group extends React.Component {} + + export class Shape extends React.Component {} + + export class Surface extends React.Component {} + + export class Text extends React.Component {} +}