Skip to content

Commit

Permalink
Export ref type for consumption
Browse files Browse the repository at this point in the history
  • Loading branch information
crcarrick authored and jackocnr committed Jun 19, 2024
1 parent d641bc2 commit d46d71d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions react/build/IntlTelInput.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -989,11 +989,11 @@ declare module "intl-tel-input/react" {
initOptions?: SomeOptions;
inputProps?: object;
};
type ItiRef = {
export type IntlTelInputRef = {
getInstance: () => Iti | null;
getInput: () => HTMLInputElement | null;
};
const IntlTelInput: React.ForwardRefExoticComponent<ItiProps & React.RefAttributes<ItiRef>>;
const IntlTelInput: React.ForwardRefExoticComponent<ItiProps & React.RefAttributes<IntlTelInputRef>>;
export default IntlTelInput;
}
declare module "intl-tel-input/utils-compiled" {
Expand All @@ -1019,10 +1019,10 @@ declare module "intl-tel-input/reactWithUtils" {
initOptions?: SomeOptions;
inputProps?: object;
};
type ItiRef = {
export type IntlTelInputRef = {
getInstance: () => Iti | null;
getInput: () => HTMLInputElement | null;
};
const IntlTelInput: React.ForwardRefExoticComponent<ItiProps & React.RefAttributes<ItiRef>>;
const IntlTelInput: React.ForwardRefExoticComponent<ItiProps & React.RefAttributes<IntlTelInputRef>>;
export default IntlTelInput;
}
4 changes: 2 additions & 2 deletions react/src/intl-tel-input/react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type ItiProps = {
inputProps?: object;
};

type ItiRef = {
export type IntlTelInputRef = {
getInstance: () => Iti | null;
getInput: () => HTMLInputElement | null;
}
Expand All @@ -31,7 +31,7 @@ const IntlTelInput = forwardRef(function IntlTelInput({
usePreciseValidation = false,
initOptions = {},
inputProps = {},
}: ItiProps, ref: React.ForwardedRef<ItiRef>) {
}: ItiProps, ref: React.ForwardedRef<IntlTelInputRef>) {
const inputRef = useRef<HTMLInputElement | null>(null);
const itiRef = useRef<Iti | null>(null);

Expand Down
4 changes: 2 additions & 2 deletions react/src/intl-tel-input/reactWithUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type ItiProps = {
inputProps?: object;
};

type ItiRef = {
export type IntlTelInputRef = {
getInstance: () => Iti | null;
getInput: () => HTMLInputElement | null;
}
Expand All @@ -32,7 +32,7 @@ const IntlTelInput = forwardRef(function IntlTelInput({
usePreciseValidation = false,
initOptions = {},
inputProps = {},
}: ItiProps, ref: React.ForwardedRef<ItiRef>) {
}: ItiProps, ref: React.ForwardedRef<IntlTelInputRef>) {
const inputRef = useRef<HTMLInputElement | null>(null);
const itiRef = useRef<Iti | null>(null);

Expand Down

0 comments on commit d46d71d

Please sign in to comment.