Skip to content

Commit 91fd859

Browse files
facuacostagmmazzarolo
authored andcommitted
fix: Update ModalProps types to exclude required props (#290)
1 parent 2531fe0 commit 91fd859

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

typings/index.d.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55

66
import * as React from "react";
77
import { ViewStyle, TextStyle } from "react-native";
8-
import { ModalProps as ReactNativeModalProps } from "react-native-modal";
8+
import { ModalProps } from "react-native-modal";
9+
10+
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
11+
type ReactNativeModalProps = Omit<ModalProps, "children" | "isVisible">;
912

1013
interface DateTimePickerProps {
1114
/**
@@ -232,4 +235,4 @@ interface DateTimePickerProps {
232235
export default class DateTimePicker extends React.Component<
233236
DateTimePickerProps,
234237
any
235-
> {}
238+
> { }

0 commit comments

Comments
 (0)