-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript types? #9
Comments
I tried to work around it in the meantime, since the whole |
Here's what I've got: declare module 'react-final-form-html5-validation' {
import { ComponentType } from 'react';
import { FieldProps } from 'react-final-form';
interface Props {
max?: number;
maxLength?: number;
min?: number;
minLength?: number;
pattern?: string;
required?: boolean;
step?: number;
}
type MessageValue = string | ((value: any, props: Props) => string);
interface Messages {
badInput?: MessageValue;
patternMismatch?: MessageValue;
rangeOverflow?: MessageValue;
rangeUnderflow?: MessageValue;
stepMismatch?: MessageValue;
tooLong?: MessageValue;
tooShort?: MessageValue;
typeMismatch?: MessageValue;
valueMissing?: MessageValue;
}
export type Html5ValidationFieldProps<FieldValue = any, T extends HTMLElement = any> = FieldProps<
FieldValue,
HTMLElement
> &
Messages;
export const Field: ComponentType<Html5ValidationFieldProps>;
} |
I'd like to revive this, considering that the core packages have types. |
I'm starting here DefinitelyTyped/DefinitelyTyped#51524 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Any idea where I can get hold of typescript types for this please?
The text was updated successfully, but these errors were encountered: