Skip to content

Commit 50e0d34

Browse files
committed
♻️ Update typings
1 parent 9a4520b commit 50e0d34

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

typings/index.d.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
import * as React from 'react';
22

3-
export class OtpInput extends React.Component<OtpInputProps, OtpInputState> {
3+
declare class OtpInput extends React.Component<
4+
OtpInputProps,
5+
OtpInputState,
6+
any
7+
> {
48
static defaultProps: {
59
numInputs: number;
610
onChange: (otp: number) => void;
711
isDisabled: boolean;
812
shouldAutoFocus: boolean;
913
value: string;
1014
};
15+
constructor(props: Readonly<OtpInputProps>);
16+
constructor(props: OtpInputProps, context?: any);
1117
getOtpValue: () => any;
1218
getPlaceholderValue: () => any;
1319
handleOtpChange: (otp: string[]) => void;
@@ -23,7 +29,7 @@ export class OtpInput extends React.Component<OtpInputProps, OtpInputState> {
2329
renderInputs: () => any[];
2430
}
2531

26-
export interface OtpInputProps {
32+
interface OtpInputProps {
2733
className?: string;
2834
containerStyle?: Object;
2935
disabledStyle?: Object;
@@ -36,13 +42,16 @@ export interface OtpInputProps {
3642
isInputSecure?: boolean;
3743
numInputs: number;
3844
onChange: Function;
39-
placeholder: string;
45+
placeholder?: string;
4046
separator?: Object;
4147
shouldAutoFocus?: boolean;
4248
value?: string;
4349
}
4450

45-
export interface OtpInputState {
51+
interface OtpInputState {
4652
activeInput: number;
4753
otp: string[];
4854
}
55+
56+
export { OtpInputProps };
57+
export default OtpInput;

0 commit comments

Comments
 (0)