Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Copy types from DefinitelyTyped into index.d.ts (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardbarrell-calvium authored and Esemesek committed Dec 18, 2019
1 parent 98bf2e4 commit 9da53ee
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -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<ViewStyle>;
width: number;
height: number;
}

export class ClippingRectangle extends React.Component<ARTClippingRectangleProps> {}

export class Group extends React.Component<ARTGroupProps> {}

export class Shape extends React.Component<ARTShapeProps> {}

export class Surface extends React.Component<ARTSurfaceProps> {}

export class Text extends React.Component<ARTTextProps> {}
}

0 comments on commit 9da53ee

Please sign in to comment.