Skip to content

Commit

Permalink
fix(index.d.ts): type fix
Browse files Browse the repository at this point in the history
type fixed

#33
  • Loading branch information
shahnawaz committed Jun 22, 2020
1 parent d514020 commit e0c9924
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,13 @@ value: `function`

Details: Handler to receive `onLayout` event of finder. Useful if you want to only detect barcode inside the Finder area.

parameter: `nativeEvent`
parameter: `event`
```
{
target: number,
layout: { height: number, width: number, x: number, y: number}
nativeEvent: {
target: number,
layout: { height: number, width: number, x: number, y: number}
}
}
```

Expand Down
3 changes: 2 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export interface LayoutRectangle {
/* taken from react-native types */
export interface LayoutChangeEvent {
nativeEvent: {
target: number;
layout: LayoutRectangle;
};
}
Expand All @@ -32,7 +33,7 @@ export interface BarcodeMaskProps {
lineAnimationDuration?: number;
animatedLineOrientation?: string;
useNativeDriver?: boolean;
onLayoutMeasured?: (nativeEvent: LayoutChangeEvent) => {};
onLayoutMeasured?: (event: LayoutChangeEvent) => {};
}

declare class BarcodeMask extends Component<BarcodeMaskProps, {}> {}
Expand Down

0 comments on commit e0c9924

Please sign in to comment.