-
Notifications
You must be signed in to change notification settings - Fork 74
Cannot be used with typescript #19
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
Comments
I was just about to post the same issue 👍 |
So... I pulled the repo to take a look at it myself, and the reason why there's no declaration file generated is that the |
@otatar For the time being, you can just create a declare module 'tailwind-datepicker-react' {
import { ReactElement } from 'react';
interface ITheme {
background: string;
todayBtn: string;
clearBtn: string;
icons: string;
text: string;
disabledText: string;
input: string;
inputIcon: string;
selected: string;
}
interface IIcons {
prev: () => ReactElement;
next: () => ReactElement;
}
export interface IOptions {
title?: string;
autoHide?: boolean;
todayBtn?: boolean;
todayBtnText?: string;
clearBtn?: boolean;
clearBtnText?: string;
maxDate?: Date;
minDate?: Date;
theme?: ITheme;
icons?: IIcons;
datepickerClassNames?: string;
defaultDate?: Date | null;
language?: string;
weekDays?: string[];
disabledDates?: Date[];
inputNameProp?: string;
inputIdProp?: string;
inputPlaceholderProp?: string;
inputDateFormatProp?: Intl.DateTimeFormatOptions;
}
type DatepickerProps = {
children?: ReactElement | ReactNode;
options?: IOptions;
onChange?: (date: Date) => void;
show: boolean;
setShow: (show: boolean) => void;
classNames?: string;
selectedDateState?: [Date, (date: Date) => void];
}
export default function Datepicker(props: DatepickerProps): ReactElement
} |
I will be pushing a new version where the ts error is ignored. |
The same issue here :/ |
Fixes #19 Add ts-ignore to Intl.Locale type error
* Cannot be used with typescript Fixes #19 Add ts-ignore to Intl.Locale type error * 1.4.1
Cannot be used with typescript:
The text was updated successfully, but these errors were encountered: