diff --git a/index.d.ts b/index.d.ts index 1a085477e..508ecef02 100644 --- a/index.d.ts +++ b/index.d.ts @@ -151,8 +151,11 @@ export interface TransformProps extends TransformObject { transform?: string | TransformObject, } -export interface CommonPathProps extends FillProps, StrokeProps, ClipProps, TransformProps, ResponderProps, TouchableProps, DefinitionProps {} +export interface CommonMaskProps { + mask?: string; + } +export interface CommonPathProps extends FillProps, StrokeProps, ClipProps, TransformProps, ResponderProps, TouchableProps, DefinitionProps, CommonMaskProps {} // Element props export interface CircleProps extends CommonPathProps { @@ -320,7 +323,31 @@ export const TextPath: React.ComponentClass; export interface UseProps extends CommonPathProps { href: string, - width: string, - height: string, + width?: string, + height?: string, + x?: NumberProp, + y?: NumberProp, } export const Use: React.ComponentClass; + + +export enum EMaskUnits { + USER_SPACE_ON_USE = 'userSpaceOnUse', + OBJECT_BOUNDING_BOX = 'objectBoundingBox', +} + +export type TMaskUnits = +| EMaskUnits.USER_SPACE_ON_USE +| EMaskUnits.OBJECT_BOUNDING_BOX; + +export interface MaskProps extends CommonPathProps { + id: string, + x?: NumberProp, + y?: NumberProp, + width?: NumberProp, + height?: NumberProp, + maskTransform?: string, + maskUnits?: TMaskUnits, + maskContentUnits?: TMaskUnits, +} +export const Mask: React.ComponentClass;